etcdutil

package
v1.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2017 License: Apache-2.0 Imports: 8 Imported by: 132

Documentation

Index

Constants

View Source
const (
	// DefaultDialTimeout is the maximum amount of time a dial will wait for a
	// connection to setup. 30s is long enough for most of the network conditions.
	DefaultDialTimeout = 30 * time.Second

	// DefaultRequestTimeout 10s is long enough for most of etcd clusters.
	DefaultRequestTimeout = 10 * time.Second

	// DefaultSlowRequestTime 1s for the threshold for normal request, for those
	// longer then 1s, they are considered as slow requests.
	DefaultSlowRequestTime = 1 * time.Second
)

Variables

This section is empty.

Functions

func AddEtcdMember

func AddEtcdMember(client *clientv3.Client, urls []string) (*clientv3.MemberAddResponse, error)

AddEtcdMember adds an etcd member.

func CheckClusterID

func CheckClusterID(localClusterID types.ID, um types.URLsMap) error

CheckClusterID checks Etcd's cluster ID, returns an error if mismatch. This function will never block even quorum is not satisfied.

func ListEtcdMembers

func ListEtcdMembers(client *clientv3.Client) (*clientv3.MemberListResponse, error)

ListEtcdMembers returns a list of internal etcd members.

func RemoveEtcdMember

func RemoveEtcdMember(client *clientv3.Client, id uint64) (*clientv3.MemberRemoveResponse, error)

RemoveEtcdMember removes a member by the given id.

func WaitEtcdStart

func WaitEtcdStart(c *clientv3.Client, endpoint string) error

WaitEtcdStart checks etcd starts ok or not

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL