# Functions
AddEtcdMember adds an etcd member.
CheckClusterID checks etcd cluster ID, returns an error if mismatch.
CreateEtcdClient creates etcd v3 client with detecting endpoints.
CreateHTTPClient creates a http client with the given tls config.
EtcdKVGet returns the etcd GetResponse by given key or key prefix.
EtcdKVPutWithTTL put (key, value) into etcd with a ttl of ttlSeconds.
GetProtoMsgWithModRev returns boolean to indicate whether the key exists or not.
GetValue gets value with key from etcd.
IsHealthy checks if the etcd is healthy.
ListEtcdMembers returns a list of internal etcd members.
MustAddEtcdMember is used to add a new etcd member to the cluster for test.
NewLoopWatcher creates a new LoopWatcher.
NewTestEtcdCluster is used to create a etcd cluster for the unit test purpose.
NewTestSingleConfig is used to create a etcd config for the unit test purpose.
RemoveEtcdMember removes a member by the given id.
# Constants
DefaultDialTimeout is the maximum amount of time a dial will wait for a connection to setup.
DefaultRequestTimeout 10s is long enough for most of etcd clusters.
DefaultSlowRequestTime 1s for the threshold for normal request, for those longer then 1s, they are considered as slow requests.
MaxEtcdTxnOps is the max value of operations in an etcd txn.
RequestProgressInterval is the interval to call RequestProgress for watcher.
WatchChTimeoutDuration is the timeout duration for a watchChan.
# Structs
LoopWatcher loads data from etcd and sets a watcher for it.