validation

package
v1.3.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Periodic

func Periodic(ctx context.Context, period time.Duration, f Validation) error

Periodic runs validation once in a period, starting immediately.

Types

type ConsensusData

type ConsensusData struct {
	Consensus, State []byte
}

type ConsensusValidation

type ConsensusValidation struct {
	// contains filtered or unexported fields
}

func NewConsensusValidation

func NewConsensusValidation(size, tolerate int) *ConsensusValidation

func (*ConsensusValidation) Complete

func (*ConsensusValidation) Next

type ConsensusValidationIteration

type ConsensusValidationIteration struct {
	// contains filtered or unexported fields
}

func (*ConsensusValidationIteration) OnData

func (iter *ConsensusValidationIteration) OnData(id int, data *ConsensusData)

type SyncValidation

type SyncValidation struct {
	// contains filtered or unexported fields
}

func (*SyncValidation) OnData

func (s *SyncValidation) OnData(id int, synced bool) error

type Validation

type Validation func(context.Context) error

func Consensus

func Consensus(c *cluster.Cluster, tolerate, distance int) Validation

func Sync

func Sync(c *cluster.Cluster, tolerate int) Validation

Jump to

Keyboard shortcuts

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