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 ¶
Types ¶
type EtcdConfig ¶
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)
Click to show internal directories.
Click to hide internal directories.