cond

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(conds Conditions)

func EvaluateParallel

func EvaluateParallel(conds Conditions, workers int, stepOffset int)

func StepDuration

func StepDuration(cid string, offset int) int

Types

type Condition

type Condition struct {
	ID       string
	Requires []string
	Done     bool
}

func (*Condition) IsAvailable

func (c *Condition) IsAvailable(cs Conditions) bool

type Conditions

type Conditions map[string]*Condition

func (Conditions) AllDone

func (cs Conditions) AllDone() bool

func (Conditions) Available

func (cs Conditions) Available() []*Condition

type Worker

type Worker struct {
	Cond  *Condition
	Start int
	Dur   int
}

Jump to

Keyboard shortcuts

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