resourcemodifier

package
v0.129.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Append

type Append struct {
	Run []string `yaml:"run"`
}

type Manager

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

func NewManager

func NewManager(resourceModifiers ...*Modifier) *Manager

func (*Manager) Acquire

func (manager *Manager) Acquire(resources map[string]float64) *Modifier

type Modifier

type Modifier struct {
	Match  map[string]float64 `yaml:"match"`
	Append Append             `yaml:"append"`

	sync.Mutex
}

func (*Modifier) Matches

func (modifier *Modifier) Matches(requested map[string]float64) bool

Jump to

Keyboard shortcuts

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