Skip to content

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