Skip to content

Add Lock TTL/Refresh methods and key existence check #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nmurthy
Copy link
Contributor

@nmurthy nmurthy commented Jun 24, 2025

Extends the lock.Lock interface with TTL() and Refresh() methods
needed for compatibility with third-party locking libraries.

Changes:

  • Add TTL() method to check remaining lock duration
  • Add Refresh() method to extend lock duration
  • Add Exists() function to kv package for key existence checks
  • Update _nullLock to implement new interface methods
  • Add comprehensive tests for new functionality

These additions support migrating hermes and director away from
direct Redis dependencies while maintaining full functionality.

Extends the lock.Lock interface with TTL() and Refresh() methods
needed for compatibility with third-party locking libraries.

Changes:
- Add TTL() method to check remaining lock duration
- Add Refresh() method to extend lock duration
- Add Exists() function to kv package for key existence checks
- Update _nullLock to implement new interface methods
- Add comprehensive tests for new functionality

These additions support migrating hermes and director away from
direct Redis dependencies while maintaining full functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant