etcd

package
v0.0.0-...-770821e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireLock

func AcquireLock(client *clientv3.Client, lockKey string, ttl int64) (*clientv3.LeaseGrantResponse, error)

func CloseEtcdClient

func CloseEtcdClient()

func CreateOrUpdateEndpoint

func CreateOrUpdateEndpoint(key string, value interface{}) error

func DeleteEndpoint

func DeleteEndpoint(key string) error

func GetEndpoint

func GetEndpoint(key string) (interface{}, error)

func GetEtcdClient

func GetEtcdClient() *clientv3.Client

func NewEtcdClient

func NewEtcdClient(endpoints []string)

func ReleaseOrderLock

func ReleaseOrderLock(client *clientv3.Client, lockKey string, leaseID clientv3.LeaseID) error

func WaitForLockRelease

func WaitForLockRelease(ctx context.Context, client *clientv3.Client, lockKey string, interfaceAction interface{}, releaseAction func(interface{}))

func WatchKeyChanges

func WatchKeyChanges(client *clientv3.Client, key string, configChan chan<- interface{})

Types

type InitEndpoint

type InitEndpoint struct {
	Init bool `yaml:"init"`
}

Jump to

Keyboard shortcuts

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