etcd

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitContext

func InitContext(c context.Context)

func InitLogger

func InitLogger(logger *zap.SugaredLogger)

Types

type Config

type Config struct {
	Endpoints   []string `yaml:"endpoints"`
	LockKey     string   `yaml:"lockKey"`
	LockTimeout string   `yaml:"lockTimeout"`
}

func (Config) GetTimeoutDuration

func (ec Config) GetTimeoutDuration(parentContext context.Context) (context.Context, context.CancelFunc)

func (*Config) SetDefaults

func (ec *Config) SetDefaults()

type Locker

type Locker struct {
	// contains filtered or unexported fields
}

func NewEtcdLocker

func NewEtcdLocker(config Config) Locker

func (*Locker) Close

func (el *Locker) Close()

func (*Locker) Lock

func (el *Locker) Lock()

func (*Locker) UnLock

func (el *Locker) UnLock()

Jump to

Keyboard shortcuts

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