Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupRestoreClient ¶
type BackupRestoreClient interface { // GetInitializationStatus gets the latest state of initialization from the backup-restore. GetInitializationStatus(ctx context.Context) (InitStatus, error) // TriggerInitialization triggers the initialization on the backup-restore passing in the ValidationType. TriggerInitialization(ctx context.Context, validationType ValidationType) error // GetEtcdConfig gets the etcd configuration from the backup-restore, stores it into a file and returns the path to the file. GetEtcdConfig(ctx context.Context) (string, error) }
BackupRestoreClient is a client to connect to the backup-restore HTTPs server.
func NewClient ¶
func NewClient(httpClient *http.Client, backupRestoreBaseAddress, etcdConfigFilePath string) BackupRestoreClient
NewClient creates and returns a new BackupRestoreClient object
func NewDefaultClient ¶
func NewDefaultClient(brConfig types.BackupRestoreConfig) (BackupRestoreClient, error)
NewDefaultClient creates a BackupRestoreClient using the BackupRestoreConfig and etcd configuration at etcdConfigPath. It delegates the responsibility to NewClient by passing in a default implementation of HttpClientCreator.
type InitStatus ¶
type InitStatus int
InitStatus is the status of initialisation as returned from backup-restore.
const ( // Unknown indicates that the initialisation by backup-restore is unknown. Unknown InitStatus = iota // New indicates that the initialisation by backup-restore is new and has not started yet. New // InProgress indicates that the initialisation by backup-restore is in-progress. InProgress // Successful indicates that the initialisation by backup-restore is successful. Successful )
func (InitStatus) String ¶
func (i InitStatus) String() string
type ValidationType ¶
type ValidationType string
ValidationType represents the type of validation that should be done of etcd DB during initialisation.
const ( // SanityValidation only does sanity validation of the etcd DB. SanityValidation ValidationType = "sanity" // validation_sanity // FullValidation does a complete validation of the etcd DB. FullValidation ValidationType = "full" // validation_full )
Click to show internal directories.
Click to hide internal directories.