case4

package
v0.0.0-...-76674d2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETCD_ENDPOINTS_ENV = "DARWIN_ETCD_ENDPOINTS"
	ETCD_AUTH_ENV      = "DARWIN_ETCD_AUTH"

	EtcdClientTimeout = 30 * time.Second
)

Variables

View Source
var (
	EtcdElectPreStr = "election"
)

Functions

func Do

func Do()

Types

type EtcdConfig

type EtcdConfig struct {
	Endpoints          []string
	UserName, Password string
	Timeout            time.Duration
}

type EtcdElection

type EtcdElection struct {
	Leader chan string
	// contains filtered or unexported fields
}

func NewElection

func NewElection(name string, cli *clientv3.Client) (em *EtcdElection, err error)

func (*EtcdElection) Campaign

func (e *EtcdElection) Campaign(val string) (err error)

func (*EtcdElection) Resign

func (e *EtcdElection) Resign() (err error)

Jump to

Keyboard shortcuts

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