Documentation ¶
Index ¶
- type ConsulLocker
- func (c *ConsulLocker) Deregister(s string) error
- func (c *ConsulLocker) GetServices(ctx context.Context, serviceName string, tags []string) ([]*lockers.Service, error)
- func (c *ConsulLocker) Init(ctx context.Context, cfg map[string]interface{}, opts ...lockers.Option) error
- func (c *ConsulLocker) IsLocked(ctx context.Context, k string) (bool, error)
- func (c *ConsulLocker) KeepLock(ctx context.Context, key string) (chan struct{}, chan error)
- func (c *ConsulLocker) List(ctx context.Context, prefix string) (map[string]string, error)
- func (c *ConsulLocker) Lock(ctx context.Context, key string, val []byte) (bool, error)
- func (c *ConsulLocker) Register(ctx context.Context, s *lockers.ServiceRegistration) error
- func (c *ConsulLocker) SetLogger(logger *log.Logger)
- func (c *ConsulLocker) Stop() error
- func (c *ConsulLocker) String() string
- func (c *ConsulLocker) Unlock(ctx context.Context, key string) error
- func (c *ConsulLocker) WatchServices(ctx context.Context, serviceName string, tags []string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulLocker ¶
type ConsulLocker struct { Cfg *config // contains filtered or unexported fields }
func (*ConsulLocker) Deregister ¶
func (c *ConsulLocker) Deregister(s string) error
func (*ConsulLocker) GetServices ¶
func (*ConsulLocker) KeepLock ¶
func (c *ConsulLocker) KeepLock(ctx context.Context, key string) (chan struct{}, chan error)
func (*ConsulLocker) Register ¶
func (c *ConsulLocker) Register(ctx context.Context, s *lockers.ServiceRegistration) error
func (*ConsulLocker) SetLogger ¶
func (c *ConsulLocker) SetLogger(logger *log.Logger)
func (*ConsulLocker) Stop ¶
func (c *ConsulLocker) Stop() error
func (*ConsulLocker) String ¶
func (c *ConsulLocker) String() string
Click to show internal directories.
Click to hide internal directories.