etcd

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Del

func Del(key string, opts ...clientv3.OpOption) error

func ExecAllTask

func ExecAllTask(key string, ttl int, task func()) error

ExecAllTask 基于分布式的全部执行任务

func ExecOnceTask

func ExecOnceTask(key string, ttl int, task func()) error

ExecOnceTask 基于分布式的唯一执行任务

func Exit

func Exit(key string, opts ...clientv3.OpOption)

func Get

func Get(key string, opts ...clientv3.OpOption) ([]*mvccpb.KeyValue, error)

func Init

func Init(etcdCfg *config.Etcd)

func OnceTask1

func OnceTask1(key string, ttl int64, cb func()) error

OnceTask1 基于分布式的唯一执行任务

func Put

func Put(key, value string, opts ...clientv3.OpOption) error

func PutWithLease

func PutWithLease(key, val string, ttl int64, opts ...clientv3.OpOption) error

func Register

func Register(serverName, addr string, ttl int64) error

func Unregister

func Unregister(serverName, addr string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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