verify

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 13

Documentation

Index

Constants

View Source
const ENV_VERIFY = "ETCD_VERIFY"
View Source
const ENV_VERIFY_ALL_VALUE = "all"

Variables

This section is empty.

Functions

func MustVerifyIfEnabled

func MustVerifyIfEnabled(cfg Config)

MustVerifyIfEnabled performs verification according to ETCD_VERIFY env settings and exits in case of found problems. See Verify for more information.

func Verify

func Verify(cfg Config) error

Verify performs consistency checks of given etcd data-directory. The errors are reported as the returned error, but for some situations the function can also panic. The function is expected to work on not-in-use data model, i.e. no file-locks should be taken. Verify does not modified the data.

func VerifyIfEnabled

func VerifyIfEnabled(cfg Config) error

VerifyIfEnabled performs verification according to ETCD_VERIFY env settings. See Verify for more information.

Types

type Config

type Config struct {
	// DataDir is a root directory where the data being verified are stored.
	DataDir string

	// ExactIndex requires consistent_index in backend exactly match the last committed WAL entry.
	// Usually backend's consistent_index needs to be <= WAL.commit, but for backups the match
	// is expected to be exact.
	ExactIndex bool

	Logger *zap.Logger
}

Jump to

Keyboard shortcuts

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