package verify

import "go.etcd.io/etcd/server/v3/verify"

Index

Constants

const ENV_VERIFY = "ETCD_VERIFY"
const ENV_VERIFY_ALL_VALUE = "all"

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
}

Source Files

doc.go verify.go

Version
v3.5.18 (latest)
Published
Jan 24, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
5 days ago

Tools for package owners.