Documentation
¶
Index ¶
- func NewTestStore(t *testing.T) *collstore.Store
- func SeedGlobalFlags(t *testing.T, st *collstore.Store)
- type FakeLocker
- func (f *FakeLocker) Deregister(string) error
- func (f *FakeLocker) GetServices(context.Context, string, []string) ([]*lockers.Service, error)
- func (f *FakeLocker) Init(context.Context, map[string]any, ...lockers.Option) error
- func (f *FakeLocker) IsLocked(_ context.Context, key string) (bool, error)
- func (f *FakeLocker) KeepLock(ctx context.Context, key string) (chan struct{}, chan error)
- func (f *FakeLocker) List(_ context.Context, prefix string) (map[string]string, error)
- func (f *FakeLocker) Lock(_ context.Context, key string, val []byte) (bool, error)
- func (f *FakeLocker) Register(context.Context, *lockers.ServiceRegistration) error
- func (f *FakeLocker) SetLock(key, holder string)
- func (f *FakeLocker) SetLogger(l *slog.Logger)
- func (f *FakeLocker) Stop() error
- func (f *FakeLocker) Unlock(_ context.Context, key string) error
- func (f *FakeLocker) WatchServices(ctx context.Context, _ string, _ []string, ch chan<- []*lockers.Service, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FakeLocker ¶
type FakeLocker struct {
// contains filtered or unexported fields
}
FakeLocker is an in-memory lockers.Locker for manager integration tests.
func NewFakeLocker ¶
func NewFakeLocker() *FakeLocker
func (*FakeLocker) Deregister ¶
func (f *FakeLocker) Deregister(string) error
func (*FakeLocker) GetServices ¶
func (*FakeLocker) KeepLock ¶
func (f *FakeLocker) KeepLock(ctx context.Context, key string) (chan struct{}, chan error)
func (*FakeLocker) Register ¶
func (f *FakeLocker) Register(context.Context, *lockers.ServiceRegistration) error
func (*FakeLocker) SetLock ¶
func (f *FakeLocker) SetLock(key, holder string)
SetLock seeds a lock as if held by holder (member id).
func (*FakeLocker) SetLogger ¶
func (f *FakeLocker) SetLogger(l *slog.Logger)
func (*FakeLocker) Stop ¶
func (f *FakeLocker) Stop() error
Click to show internal directories.
Click to hide internal directories.