Versions in this module Expand all Collapse all v1 v1.2.5 Sep 23, 2024 Changes in this version + func SyncReservationsTest(ctx context.Context, factory SyncFactory) + type MutexSyncFactory struct + func NewMutexSyncFactory() *MutexSyncFactory + func (s *MutexSyncFactory) NewSyncReservations(name string) SyncReservations + type MutexSyncReservations struct + func NewMutexSyncReservations(name string) *MutexSyncReservations + func (s *MutexSyncReservations) Get(ctx context.Context) (map[string]string, error) + func (s *MutexSyncReservations) Release(ctx context.Context, keys ...string) error + func (s *MutexSyncReservations) ReleaseForOwner(ctx context.Context, ownerID string) error + func (s *MutexSyncReservations) ReserveValues(ctx context.Context, ...) error + type Reservations map[string]string + func (s Reservations) Add(value, ownerID string) + func (s Reservations) AddIfMissing(value string) + func (s Reservations) Has(value string) (string, bool) + func (s Reservations) RemoveForOwner(ownerID string) + type SyncFactory interface + NewSyncReservations func(name string) SyncReservations + type SyncReservations interface + Get func(ctx context.Context) (map[string]string, error) + Release func(ctx context.Context, keys ...string) error + ReleaseForOwner func(ctx context.Context, ownerID string) error + ReserveValues func(ctx context.Context, ...) error