Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultNumChecks = 1000 DefaultRequiredPriceLivenessPercent = 99.0 DefaultValidationPeriod = 10 * time.Minute DefaultBurnInPeriod = 60 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// BurnInPeriod is the amount of time to let the sidecar run before checking validation.
// This ensures that any markets or prices that take a few iterations to land will be populated,
// eliminating false positives.
BurnInPeriod time.Duration
// ValidationPeriod is the amount of time the validation service will check that prices are landing correctly.
ValidationPeriod time.Duration
// NumChecks is the number of times the validation service will check validity over the ValidationPeriod.
NumChecks int
// RequiredPriceLivenessPercent is the percentage of liveness each price must demonstrate to be considered "valid".
RequiredPriceLivenessPercent float64
}
Config includes information for configuring a validation service instance.
type LivenessResults ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewDefaultValidator ¶
func NewDefaultValidator(logger *zap.Logger, metrics oraclemetrics.Metrics) Validator
NewDefaultValidator returns a new validator service with the default configuration.
func NewValidator ¶
NewValidator returns a new validator service with given configuration.
Click to show internal directories.
Click to hide internal directories.