Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultGossipPort = 7980
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// name used for etcd.Embed instance, should generally be left alone so
// that a random name is generated
Name string
// directory used for etcd data-dir, wal and snapshot dirs derived from
// this by etcd
Dir string
// the required number of nodes that must be present to start a cluster
RequiredClusterSize int
// allows for explicit setting of the host ip
Host string
// client endpoint for accessing etcd
ClientAddr string
// client url created based upon the client address and use of TLS
ClientURL url.URL
// address used for traffic within the cluster
PeerAddr string
// peer url created based upon the peer address and use of TLS
PeerURL url.URL
// address used for gossip network
GossipAddr string
// host used for gossip network, derived from GossipAddr
GossipHost string
// port used for gossip network, derived from GossipAddr
GossipPort int
// key used to secure the gossip network, derived from PeerSecurity settings
GossipSecretKey []byte
// addresses used to bootstrap the gossip network
BootstrapAddrs []string
// amount of time to attempt bootstrapping before failing
BootstrapTimeout time.Duration
// identifies a cloud provider to be used for peer discovery
CloudProvider string `mapstructure:"cloud_provider"`
// interval for creating etcd snapshots
SnapshotInterval time.Duration
// use gzip compression for snapshot backup
SnapshotCompression bool
// how often to perform a health check
HealthCheckInterval time.Duration
// time until an unreachable member is considered unhealthy
HealthCheckTimeout time.Duration
// configures authentication/transport security for clients
ClientSecurity client.SecurityConfig
// configures authentication/transport security within the etcd cluster
PeerSecurity client.SecurityConfig
// configures the level of the logger used by etcd
EtcdLogLevel zapcore.Level
discovery.PeerProvider
snapshot.SnapshotProvider
Debug bool
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages an embedded etcd instance.
func (*Manager) GracefulStop ¶
func (m *Manager) GracefulStop()
GracefulStop stops all services and cleans up the Manager state. It attempts to gracefully shutdown etcd by waiting for gRPC calls in-flight to finish.
type Member ¶
type NodeStatus ¶
type NodeStatus int
const ( Unknown NodeStatus = iota Pending Running )
func (NodeStatus) String ¶
func (s NodeStatus) String() string
Click to show internal directories.
Click to hide internal directories.