Documentation ¶
Index ¶
- Constants
- func BindirForEtcdVersion(etcdVersion string, cmd string) (string, error)
- func BuildTLSClientConfig(keypairs *pki.Keypairs, cn string) (*tls.Config, error)
- func DoBackup(backupStore backup.Store, info *protoetcd.BackupInfo, dataDir string, ...) (*protoetcd.DoBackupResponse, error)
- func DoBackupV3(backupStore backup.Store, info *protoetcd.BackupInfo, clientUrls []string, ...) (*protoetcd.DoBackupResponse, error)
- func RunEtcdFromBackup(backupStore backup.Store, backupName string, basedir string) (*etcdProcess, error)
- type EtcdServer
- func (s *EtcdServer) DoBackup(ctx context.Context, request *protoetcd.DoBackupRequest) (*protoetcd.DoBackupResponse, error)
- func (s *EtcdServer) DoRestore(ctx context.Context, request *protoetcd.DoRestoreRequest) (*protoetcd.DoRestoreResponse, error)
- func (s *EtcdServer) GetInfo(ctx context.Context, request *protoetcd.GetInfoRequest) (*protoetcd.GetInfoResponse, error)
- func (s *EtcdServer) JoinCluster(ctx context.Context, request *protoetcd.JoinClusterRequest) (*protoetcd.JoinClusterResponse, error)
- func (s *EtcdServer) Reconfigure(ctx context.Context, request *protoetcd.ReconfigureRequest) (*protoetcd.ReconfigureResponse, error)
- func (s *EtcdServer) Run(ctx context.Context)
- func (s *EtcdServer) StopEtcd(ctx context.Context, request *protoetcd.StopEtcdRequest) (*protoetcd.StopEtcdResponse, error)
- func (s *EtcdServer) StopEtcdProcessForTest() (bool, error)
- func (s *EtcdServer) UpdateEndpoints(ctx context.Context, request *protoetcd.UpdateEndpointsRequest) (*protoetcd.UpdateEndpointsResponse, error)
Constants ¶
const PreparedValidity = time.Minute
Variables ¶
This section is empty.
Functions ¶
func BindirForEtcdVersion ¶
BindirForEtcdVersion returns the directory in which the etcd binary is located, for the specified version It returns an error if the specified version cannot be found
func BuildTLSClientConfig ¶
func DoBackup ¶
func DoBackup(backupStore backup.Store, info *protoetcd.BackupInfo, dataDir string, clientUrls []string, tlsConfig *tls.Config) (*protoetcd.DoBackupResponse, error)
DoBackup performs a backup of etcd v2 or v3
func DoBackupV3 ¶
func DoBackupV3(backupStore backup.Store, info *protoetcd.BackupInfo, clientUrls []string, tlsConfig *tls.Config) (*protoetcd.DoBackupResponse, error)
DoBackupV3 performs a backup of etcd v3; using the etcd v3 API
Types ¶
type EtcdServer ¶
type EtcdServer struct {
// contains filtered or unexported fields
}
func NewEtcdServer ¶
func (*EtcdServer) DoBackup ¶
func (s *EtcdServer) DoBackup(ctx context.Context, request *protoetcd.DoBackupRequest) (*protoetcd.DoBackupResponse, error)
DoBackup performs a backup to the backupstore
func (*EtcdServer) DoRestore ¶
func (s *EtcdServer) DoRestore(ctx context.Context, request *protoetcd.DoRestoreRequest) (*protoetcd.DoRestoreResponse, error)
DoRestore restores a backup from the backup store
func (*EtcdServer) GetInfo ¶
func (s *EtcdServer) GetInfo(ctx context.Context, request *protoetcd.GetInfoRequest) (*protoetcd.GetInfoResponse, error)
GetInfo gets info about the node
func (*EtcdServer) JoinCluster ¶
func (s *EtcdServer) JoinCluster(ctx context.Context, request *protoetcd.JoinClusterRequest) (*protoetcd.JoinClusterResponse, error)
JoinCluster requests that the node join an existing cluster
func (*EtcdServer) Reconfigure ¶
func (s *EtcdServer) Reconfigure(ctx context.Context, request *protoetcd.ReconfigureRequest) (*protoetcd.ReconfigureResponse, error)
Reconfigure requests that the node reconfigure itself, in particular for an etcd upgrade/downgrade
func (*EtcdServer) Run ¶
func (s *EtcdServer) Run(ctx context.Context)
func (*EtcdServer) StopEtcd ¶
func (s *EtcdServer) StopEtcd(ctx context.Context, request *protoetcd.StopEtcdRequest) (*protoetcd.StopEtcdResponse, error)
StopEtcd requests the the node stop running etcd
func (*EtcdServer) StopEtcdProcessForTest ¶
func (s *EtcdServer) StopEtcdProcessForTest() (bool, error)
StopEtcdProcessForTest terminates etcd if it is running; primarily used for testing
func (*EtcdServer) UpdateEndpoints ¶
func (s *EtcdServer) UpdateEndpoints(ctx context.Context, request *protoetcd.UpdateEndpointsRequest) (*protoetcd.UpdateEndpointsResponse, error)
UpdateEndpoints updates /etc/hosts with the other cluster members