etcd

package
v0.0.0-...-3442565 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const PreparedValidity = time.Minute

Variables

This section is empty.

Functions

func BindirForEtcdVersion

func BindirForEtcdVersion(etcdVersion string, cmd string) (string, error)

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 BuildTLSClientConfig(keypairs *pki.Keypairs, cn string) (*tls.Config, error)

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

func RunEtcdFromBackup

func RunEtcdFromBackup(backupStore backup.Store, backupName string, basedir string) (*etcdProcess, error)

Types

type EtcdServer

type EtcdServer struct {
	// contains filtered or unexported fields
}

func NewEtcdServer

func NewEtcdServer(baseDir string, clusterName string, listenAddress string, listenMetricsURLs []string, etcdNodeConfiguration *protoetcd.EtcdNode, peerServer *privateapi.Server, dnsProvider dns.Provider, etcdClientsCA *pki.CA, etcdPeersCA *pki.CA, peerClientIPs []net.IP) (*EtcdServer, error)

func (*EtcdServer) DoBackup

DoBackup performs a backup to the backupstore

func (*EtcdServer) DoRestore

DoRestore restores a backup from the backup store

func (*EtcdServer) GetInfo

GetInfo gets info about the node

func (*EtcdServer) JoinCluster

JoinCluster requests that the node join an existing cluster

func (*EtcdServer) Reconfigure

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

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

UpdateEndpoints updates /etc/hosts with the other cluster members

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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