Documentation
¶
Index ¶
- func NewValkeyLoadbalancer(opt valkey.ClientOption) (valkey.Client, *loadbalancer, error)
- type ValkeyBackend
- func (r *ValkeyBackend) Close() error
- func (r *ValkeyBackend) GetLocks(group string) (int, error)
- func (r *ValkeyBackend) GetStaleLocks(ts time.Duration) ([]types.Lock, error)
- func (r *ValkeyBackend) HasLock(group string, id string) (bool, error)
- func (r *ValkeyBackend) Release(group string, id string) error
- func (r *ValkeyBackend) Reserve(group string, id string) error
- type ValkeyConfig
- type ValkeySentinelConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewValkeyLoadbalancer ¶
func NewValkeyLoadbalancer(opt valkey.ClientOption) (valkey.Client, *loadbalancer, error)
Create a new valkey client with loadbalanced connections
Types ¶
type ValkeyBackend ¶
type ValkeyBackend struct {
// contains filtered or unexported fields
}
func NewValkeyBackend ¶
func NewValkeyBackend(cfg ValkeyConfig) (*ValkeyBackend, error)
func (*ValkeyBackend) Close ¶
func (r *ValkeyBackend) Close() error
Calls all necessary finalization if necessary
func (*ValkeyBackend) GetLocks ¶
func (r *ValkeyBackend) GetLocks(group string) (int, error)
Returns the current number of locks for the given group
func (*ValkeyBackend) GetStaleLocks ¶
Return all locks older than x
func (*ValkeyBackend) HasLock ¶
func (r *ValkeyBackend) HasLock(group string, id string) (bool, error)
Check if a given id already has a lock for this group
type ValkeyConfig ¶
Click to show internal directories.
Click to hide internal directories.