verify

package
v1.63.0-rc Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("verify")

Error is the default error class for the package.

Functions

This section is empty.

Types

type Chore

type Chore struct {
	Log *zap.Logger

	Config Config

	DB segmentloop.MetabaseDB
}

Chore runs different verifications on metabase loop.

func New

func New(log *zap.Logger, mdb segmentloop.MetabaseDB, config Config) *Chore

New creates new verification.

func (*Chore) RunOnce

func (chore *Chore) RunOnce(ctx context.Context) error

RunOnce creates a new segmentloop and runs the verifications.

type Config

type Config struct {
	ProgressPrintFrequency int64
	Loop                   segmentloop.Config
}

Config contains configuration for all the services.

type ProgressObserver

type ProgressObserver struct {
	Log *zap.Logger

	ProgressPrintFrequency int64

	RemoteSegmentCount int64
	InlineSegmentCount int64
}

ProgressObserver counts and prints progress of metabase loop.

func (*ProgressObserver) InlineSegment

func (progress *ProgressObserver) InlineSegment(context.Context, *segmentloop.Segment) error

InlineSegment implements the Observer interface.

func (*ProgressObserver) LoopStarted

func (progress *ProgressObserver) LoopStarted(ctx context.Context, info segmentloop.LoopInfo) (err error)

LoopStarted is called at each start of a loop.

func (*ProgressObserver) RemoteSegment

func (progress *ProgressObserver) RemoteSegment(context.Context, *segmentloop.Segment) error

RemoteSegment implements the Observer interface.

func (*ProgressObserver) Report

func (progress *ProgressObserver) Report()

Report reports the current progress.

type SegmentSizes

type SegmentSizes struct {
	Log *zap.Logger
	// contains filtered or unexported fields
}

SegmentSizes verifies segments table plain_offset and plain_size.

func (*SegmentSizes) InlineSegment

func (verify *SegmentSizes) InlineSegment(ctx context.Context, seg *segmentloop.Segment) error

InlineSegment implements the Observer interface.

func (*SegmentSizes) LoopStarted

func (verify *SegmentSizes) LoopStarted(ctx context.Context, info segmentloop.LoopInfo) (err error)

LoopStarted is called at each start of a loop.

func (*SegmentSizes) RemoteSegment

func (verify *SegmentSizes) RemoteSegment(ctx context.Context, seg *segmentloop.Segment) error

RemoteSegment implements the Observer interface.

Jump to

Keyboard shortcuts

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