Documentation ¶
Overview ¶
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : common.go # Created : 2019-04-29 10:56 # Last Modified : 2019-04-29 10:56 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : config.go # Created : 2019-04-29 10:54 # Last Modified : 2019-04-29 10:54 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : etcd.go # Created : 2019-04-29 10:52 # Last Modified : 2019-04-29 10:52 # Describe : # # ====================================================
Index ¶
- type ClientTLSConfig
- type Config
- type Election
- func (s *Election) Close() error
- func (s *Election) Delete(ctx context.Context, key string) error
- func (s *Election) HeartBeat() error
- func (s *Election) SetNx(ctx context.Context, key string, value []byte, opts *election.WriteOptions) error
- func (s *Election) Watch(ctx context.Context, key string, stopCh <-chan struct{}) (<-chan *election.WatchRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientTLSConfig ¶
ClientTLSConfig contains data for a Client TLS configuration in the form the etcd client wants it. Eventually we'll adapt it for ZK and Consul.
type Config ¶
type Config struct { ConnectionTimeout time.Duration Username string Password string CAFile string CertFile string KeyFile string }
Config contains the options for a storage client
type Election ¶
type Election struct {
// contains filtered or unexported fields
}
Election etcd client