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 // addresses used to bootstrap the gossip network BootstrapAddrs []string // amount of time to attempt bootstrapping before failing BootstrapTimeout time.Duration // interval for creating etcd snapshots SnapshotInterval time.Duration // use gzip compression for snapshot backup SnapshotCompression bool // use aes-256 encryption for snapshot backup SnapshotEncryption 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 CACertFile string CAKeyFile string // configures the level of the logger used by etcd EtcdLogLevel zapcore.Level discovery.PeerGetter snapshot.Snapshotter Debug bool // contains filtered or unexported fields }
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 ManagerService ¶ added in v0.4.12
type ManagerService struct {
// contains filtered or unexported fields
}
func (*ManagerService) Health ¶ added in v0.4.12
func (s *ManagerService) Health(ctx context.Context, _ *types.Empty) (*e2dpb.HealthResponse, error)
func (*ManagerService) Restart ¶ added in v0.4.12
func (s *ManagerService) Restart(ctx context.Context, _ *types.Empty) (*e2dpb.RestartResponse, error)
type Member ¶
type NodeStatus ¶
type NodeStatus int
const ( Unknown NodeStatus = iota Pending Running )
func (NodeStatus) String ¶
func (s NodeStatus) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.