validator

package
v0.0.97 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RoundInterval time.Duration `arg:"env:ROUND_INTERVAL" default:"1m"`
	DatabaseURLs  []string      `arg:"env:DATABASE_URLS"`
}

type Validator

type Validator struct {
	OnOK       func(context.Context, int64) error
	OnConflict func(context.Context, int64) error
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(config *Config, logger logging.Logger) (*Validator, error)

func (*Validator) FindSafeTime

func (v *Validator) FindSafeTime(ctx context.Context, endTimestamp int64) (int64, error)

func (*Validator) Run

func (v *Validator) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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