Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DataDirectoryValid indicates data directory is valid. DataDirectoryValid = iota // WrongVolumeMounted indicates wrong volume is attached to the ETCD container WrongVolumeMounted // DataDirectoryNotExist indicates data directory is non-existent. DataDirectoryNotExist // DataDirectoryInvStruct indicates data directory has invalid structure. DataDirectoryInvStruct // DataDirectoryCorrupt indicates data directory is corrupt. DataDirectoryCorrupt // BoltDBCorrupt indicates Bolt database is corrupt. BoltDBCorrupt // DataDirectoryStatusUnknown indicates validator failed to check the data directory status. DataDirectoryStatusUnknown // DataDirStatusInvalidInMultiNode indicates validator failed to check the data directory status in multi-node etcd cluster. DataDirStatusInvalidInMultiNode // RevisionConsistencyError indicates current etcd revision is inconsistent with latest snapshot revision. RevisionConsistencyError // FailBelowRevisionConsistencyError indicates the current etcd revision is inconsistent with failBelowRevision. FailBelowRevisionConsistencyError // FailToOpenBoltDBError indicates that backup-restore is unable to open boltDB as it is failed to acquire lock over database. FailToOpenBoltDBError )
Variables ¶
View Source
var ( // ErrPathRequired is returned when the path to a Bolt database is not specified. ErrPathRequired = errors.New("path required") // ErrFileNotFound is returned when a Bolt database does not exist. ErrFileNotFound = errors.New("file not found") // ErrCorrupt is returned when a checking a data file finds errors. ErrCorrupt = errors.New("invalid value") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DataDir string EmbeddedEtcdQuotaBytes int64 SnapstoreConfig *brtypes.SnapstoreConfig }
Config store configuration for DataValidator.
type DataDirStatus ¶
type DataDirStatus int
DataDirStatus represents the status of the etcd data directory.
type DataValidator ¶
type DataValidator struct { Config *Config OriginalClusterSize int Logger *logrus.Logger ZapLogger *zap.Logger }
DataValidator contains implements Validator interface to perform data validation.
func (*DataValidator) Validate ¶
func (d *DataValidator) Validate(mode Mode, failBelowRevision int64) (DataDirStatus, error)
Validate performs the steps required to validate data for Etcd instance.
Click to show internal directories.
Click to hide internal directories.