Documentation ¶
Index ¶
- func LoggedClose(etcdClient *EtcdClient)
- type EtcdClient
- func (c *EtcdClient) AddMember(ctx context.Context, peerURLs []string) error
- func (c *EtcdClient) Close() error
- func (c *EtcdClient) CopyTo(ctx context.Context, dest NodeSink) (int, error)
- func (c *EtcdClient) Create(ctx context.Context, key string, value []byte) error
- func (c *EtcdClient) Get(ctx context.Context, key string, quorum bool, timeout time.Duration) ([]byte, error)
- func (c *EtcdClient) LeaderID(ctx context.Context) (string, error)
- func (c *EtcdClient) ListMembers(ctx context.Context) ([]*EtcdProcessMember, error)
- func (c *EtcdClient) LocalNodeInfo(ctx context.Context) (*LocalNodeInfo, error)
- func (c *EtcdClient) Put(ctx context.Context, key string, value []byte) error
- func (c *EtcdClient) RemoveMember(ctx context.Context, member *EtcdProcessMember) error
- func (c *EtcdClient) ServerVersion(ctx context.Context) (string, error)
- func (c *EtcdClient) SetPeerURLs(ctx context.Context, member *EtcdProcessMember, peerURLs []string) error
- func (c *EtcdClient) SnapshotSave(ctx context.Context, path string) error
- func (c *EtcdClient) String() string
- type EtcdProcessMember
- type LocalNodeInfo
- type NodeSink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggedClose ¶
func LoggedClose(etcdClient *EtcdClient)
LoggedClose closes the etcdclient, warning on error
Types ¶
type EtcdClient ¶
type EtcdClient struct {
// contains filtered or unexported fields
}
func (*EtcdClient) AddMember ¶
func (c *EtcdClient) AddMember(ctx context.Context, peerURLs []string) error
func (*EtcdClient) Close ¶
func (c *EtcdClient) Close() error
func (*EtcdClient) ListMembers ¶
func (c *EtcdClient) ListMembers(ctx context.Context) ([]*EtcdProcessMember, error)
func (*EtcdClient) LocalNodeInfo ¶
func (c *EtcdClient) LocalNodeInfo(ctx context.Context) (*LocalNodeInfo, error)
func (*EtcdClient) RemoveMember ¶
func (c *EtcdClient) RemoveMember(ctx context.Context, member *EtcdProcessMember) error
func (*EtcdClient) ServerVersion ¶
func (c *EtcdClient) ServerVersion(ctx context.Context) (string, error)
ServerVersion returns the version of etcd running
func (*EtcdClient) SetPeerURLs ¶
func (c *EtcdClient) SetPeerURLs(ctx context.Context, member *EtcdProcessMember, peerURLs []string) error
func (*EtcdClient) SnapshotSave ¶
func (c *EtcdClient) SnapshotSave(ctx context.Context, path string) error
func (*EtcdClient) String ¶
func (c *EtcdClient) String() string
type EtcdProcessMember ¶
type EtcdProcessMember struct { //Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` PeerURLs []string `json:"peerURLs,omitempty"` // ClientURLs is the set of URLs as reported by the cluster. // Note that it might be incorrect, because the ClientURLs are stored in Raft, but can be reconfigured from the command line ClientURLs []string `json:"endpoints,omitempty"` ID string // contains filtered or unexported fields }
func (*EtcdProcessMember) NewClient ¶
func (m *EtcdProcessMember) NewClient(clientURLs []string, tlsConfig *tls.Config) (*EtcdClient, error)
func (*EtcdProcessMember) String ¶
func (m *EtcdProcessMember) String() string
type LocalNodeInfo ¶
type LocalNodeInfo struct {
IsLeader bool
}
LocalNodeInfo has information about the etcd member node we are connected to
Click to show internal directories.
Click to hide internal directories.