taskclass

package
v0.50.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	Identifier Id             `yaml:"name"`
	Defaults   gera.StringMap `yaml:"defaults"`
	Vars       gera.StringMap `yaml:"vars"`
	Control    struct {
		Mode controlmode.ControlMode `yaml:"mode"`
	} `yaml:"control"`
	Command     *common.CommandInfo     `yaml:"command"`
	Wants       ResourceWants           `yaml:"wants"`
	Bind        []channel.Inbound       `yaml:"bind"`
	Properties  gera.StringMap          `yaml:"properties"`
	Constraints []constraint.Constraint `yaml:"constraints"`
	Connect     []channel.Outbound      `yaml:"connect"`
}

↓ We need the roles tree to know *where* to run it and how to *configure* it, but

the following information is enough to run the task even with no environment or
role Class.

func (*Class) Equals

func (c *Class) Equals(other *Class) (response bool)

func (*Class) MarshalYAML

func (c *Class) MarshalYAML() (interface{}, error)

func (*Class) UnmarshalYAML

func (c *Class) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type Classes

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

func NewClasses

func NewClasses() *Classes

func (*Classes) DeleteKey

func (c *Classes) DeleteKey(key string)

func (*Classes) DeleteKeys

func (c *Classes) DeleteKeys(keys []string)

func (*Classes) Do

func (c *Classes) Do(f func(classMap *map[string]*Class) error) error

func (*Classes) Foreach

func (c *Classes) Foreach(do func(string, *Class) bool)

func (*Classes) GetClass

func (c *Classes) GetClass(key string) (class *Class, ok bool)

func (*Classes) UpdateClass

func (c *Classes) UpdateClass(key string, class *Class)

type Id

type Id struct {
	RepoIdentifier string
	Hash           string
	Name           string
}

func (Id) String

func (tcID Id) String() string

func (*Id) UnmarshalYAML

func (tcID *Id) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type ResourceWants

type ResourceWants struct {
	Cpu    *float64    `yaml:"cpu"`
	Memory *float64    `yaml:"memory"`
	Ports  port.Ranges `yaml:"ports,omitempty"`
}

func (*ResourceWants) UnmarshalYAML

func (rw *ResourceWants) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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