axis

package
v1.28.2-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPointsSize = 5
	DefaultMaxRetry   = 200
)

Variables

View Source
var ErrRejectedGeneration = errors.New("rejected timeline generation, can't find a value that satisfy constraint")

Functions

This section is empty.

Types

type Constraint

type Constraint interface {
	Validate(value int64, points map[string]*int64) bool
	Behavior() ConstraintBehavior
}

func GreaterThan

func GreaterThan(reference string, epsilon int64, behavior ConstraintBehavior) Constraint

func LowerThan

func LowerThan(reference string, epsilon int64, behavior ConstraintBehavior) Constraint

type ConstraintBehavior

type ConstraintBehavior int
const (
	Reject ConstraintBehavior = iota
	Nullify
	Replace
)

type Generator

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

func NewGenerator

func NewGenerator(originName string, originValue int64) *Generator

func (*Generator) Generate

func (g *Generator) Generate(rng *rand.Rand, initialStates ...map[string]*int64) (map[string]*int64, error)

func (*Generator) Origin

func (g *Generator) Origin() string

func (*Generator) SetMaxRetry

func (g *Generator) SetMaxRetry(maxRetry int)

func (*Generator) SetPoint

func (g *Generator) SetPoint(name string, reference string, min, max int64, defaultValueFrom string, constraints ...Constraint)

type Range

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

Jump to

Keyboard shortcuts

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