Documentation ¶
Overview ¶
Package etcd contains core to access ETCD apis both v2 and v3. APIs v2 are not used but it was a good exercise
Package etcd contains all tools to manage etcd client and query an etcd cluster
Index ¶
- func GrpcClient(tlsCfg SecureCfg, endPoints []string) *clientv3.Client
- func HTTPClient(transport *http.Transport, endPoints string)
- func Transport(ca string, clientCertificate string, clientCertificateKey string) *http.Transport
- type ClientEndpoints
- type ClusterEndpoints
- type RaftData
- type RaftIndexPerMember
- type SecureCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrpcClient ¶
GrpcClient returns an ETCD TLS ready client
func HTTPClient ¶
HTTPClient instantiate a new etcd client, do nothing for now. Not totally nothing, it puts a key and read it.
Types ¶
type ClientEndpoints ¶
ClientEndpoints contains all the ETCD cluster members from the client (the cli) point of view
func GetEndPointsFromInitiatedClient ¶
func GetEndPointsFromInitiatedClient(cli *clientv3.Client) []ClientEndpoints
GetEndPointsFromInitiatedClient returns list of endpoints form the client you instantiated.
type ClusterEndpoints ¶
type ClusterEndpoints struct { Server string Ep []*etcdserverpb.Member Err error }
ClusterEndpoints contains all the ETCD cluster members from the cluster point of view
func GetClusterEndpoints ¶
func GetClusterEndpoints(cli *clientv3.Client) []ClusterEndpoints
GetClusterEndpoints returns the list of endpoint configured in the cluster you are querying.
type RaftData ¶
RaftData contains the RAFT index data, the member ID and the error returned by member queried
type RaftIndexPerMember ¶
RaftIndexPerMember contains the RaftData for every member queried
func GetRaftIndexPerMembers ¶
func GetRaftIndexPerMembers(cli *clientv3.Client) RaftIndexPerMember
GetRaftIndexPerMembers returns a list of RaftIndexPerMember