consul_locker

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 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

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

func (*ConsulLocker) GetServices

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

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

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

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

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