integrity

package
v0.0.0-...-be15534 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// CheckLevelNone means no integrity check, the default value.
	CheckLevelNone string = "none"
	// CheckLevelCorrectness means check each row data correctness.
	CheckLevelCorrectness string = "correctness"
)
View Source
const (
	// CorruptionHandleLevelWarn is the default value,
	// log the corrupted event, and mark it as corrupted and send it to the downstream.
	CorruptionHandleLevelWarn string = "warn"
	// CorruptionHandleLevelError means log the corrupted event, and then stopped the changefeed.
	CorruptionHandleLevelError string = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum

type Checksum struct {
	Current   uint32
	Previous  uint32
	Corrupted bool
	Version   int
}

Checksum represent checksum for an RowChangedEvent

type Config

type Config struct {
	IntegrityCheckLevel   string `toml:"integrity-check-level" json:"integrity-check-level"`
	CorruptionHandleLevel string `toml:"corruption-handle-level" json:"corruption-handle-level"`
}

Config represents integrity check config for a changefeed.

func (*Config) Enabled

func (c *Config) Enabled() bool

Enabled returns true if the integrity check is enabled.

func (*Config) ErrorHandle

func (c *Config) ErrorHandle() bool

ErrorHandle returns true if the corruption handle level is error.

func (*Config) Validate

func (c *Config) Validate() error

Validate the integrity config.

Jump to

Keyboard shortcuts

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