etcd

package
v5.0.0-...-6e0862e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocker

func NewLocker(s *concurrency.Session, pfx string) sync.Locker

NewLocker creates a sync.Locker backed by an etcd mutex.

Types

type Store

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

func NewStore

func NewStore(ctx context.Context, values configx.Values, cli *clientv3.Client, prefix string, ttl int) (Store, error)

func (Store) As

func (m Store) As(out any) bool

func (Store) Close

func (m Store) Close(ctx context.Context) error

func (Store) Context

func (m Store) Context(ctx context.Context) configx.Values

func (Store) Default

func (m Store) Default(def any) configx.Values

func (Store) Del

func (m Store) Del() error

func (Store) Done

func (m Store) Done() <-chan struct{}

func (Store) Flush

func (m Store) Flush()

func (Store) Get

func (m Store) Get() any

func (Store) Key

func (m Store) Key() []string

func (Store) Lock

func (m Store) Lock()

func (Store) NewLocker

func (m Store) NewLocker(name string) sync.Locker

func (Store) Options

func (m Store) Options() *configx.Options

func (Store) Reset

func (m Store) Reset()

func (Store) Save

func (m Store) Save(ctxUser string, ctxMessage string) error

func (Store) Set

func (m Store) Set(data interface{}) error

func (Store) Unlock

func (m Store) Unlock()

func (Store) Val

func (m Store) Val(path ...string) configx.Values

func (Store) Watch

func (m Store) Watch(opts ...watch.WatchOption) (watch.Receiver, error)

Jump to

Keyboard shortcuts

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