consul_locker

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 added in v0.8.0

func (c *ConsulLocker) Deregister(s string) error

func (*ConsulLocker) GetServices added in v0.21.0

func (c *ConsulLocker) GetServices(ctx context.Context, serviceName string, tags []string) ([]*lockers.Service, error)

func (*ConsulLocker) Init

func (c *ConsulLocker) Init(ctx context.Context, cfg map[string]interface{}, opts ...lockers.Option) error

func (*ConsulLocker) IsLocked added in v0.8.0

func (c *ConsulLocker) IsLocked(ctx context.Context, k string) (bool, error)

func (*ConsulLocker) KeepLock

func (c *ConsulLocker) KeepLock(ctx context.Context, key string) (chan struct{}, chan error)

func (*ConsulLocker) List added in v0.8.0

func (c *ConsulLocker) List(ctx context.Context, prefix string) (map[string]string, error)

func (*ConsulLocker) Lock

func (c *ConsulLocker) Lock(ctx context.Context, key string, val []byte) (bool, error)

func (*ConsulLocker) Register added in v0.8.0

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

func (*ConsulLocker) Unlock

func (c *ConsulLocker) Unlock(ctx context.Context, key string) error

func (*ConsulLocker) WatchServices added in v0.8.0

func (c *ConsulLocker) WatchServices(ctx context.Context, serviceName string, tags []string, sChan chan<- []*lockers.Service, watchTimeout time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL