etcd

package
v0.0.0-...-19a3f40 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdMutex

func NewEtcdMutex(ctx context.Context, client *clientv3.Client, pfx string) (sync.Locker, error)

初始化sync.Locker对象.

Types

type EtcdMutex

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

面向对象封装

func (*EtcdMutex) Lock

func (l *EtcdMutex) Lock()

申请锁.

func (*EtcdMutex) Unlock

func (l *EtcdMutex) Unlock()

释放锁.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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