{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package taskclass\n\nPackage taskclass provides task class definitions and resource management for different types of tasks.\n\n## Types\n\n```go\ntype Class struct {\n\tIdentifier Id                       `yaml:\"name\"`\n\tDefaults   gera.Map[string, string] `yaml:\"defaults\"`\n\tVars       gera.Map[string, string] `yaml:\"vars\"`\n\tControl    struct {\n\t\tMode controlmode.ControlMode `yaml:\"mode\"`\n\t} `yaml:\"control\"`\n\tCommand          *common.CommandInfo      `yaml:\"command\"`\n\tWants            ResourceWants            `yaml:\"wants\"`\n\tLimits           *ResourceLimits          `yaml:\"limits\"`\n\tBind             []channel.Inbound        `yaml:\"bind\"`\n\tProperties       gera.Map[string, string] `yaml:\"properties\"`\n\tConstraints      []constraint.Constraint  `yaml:\"constraints\"`\n\tConnect          []channel.Outbound       `yaml:\"connect\"`\n\tUpdatedTimestamp time.Time                `yaml:\"-\"`\n}\n```\n↓ We need the roles tree to know \\*where\\* to run it and how to \\*configure\\* it, but\n\n\tthe following information is enough to run the task even with no environment or\n\trole Class.\n\n```go\nfunc (c *Class) Equals(other *Class) (response bool)\n```\n\n```go\nfunc (c *Class) MarshalYAML() (interface{}, error)\n```\n\n```go\nfunc (c *Class) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n```go\ntype Classes struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClasses() *Classes\n```\n\n```go\nfunc (c *Classes) DeleteKey(key string)\n```\n\n```go\nfunc (c *Classes) DeleteKeys(keys []string)\n```\n\n```go\nfunc (c *Classes) Do(f func(classMap *map[string]*Class) error) error\n```\n\n```go\nfunc (c *Classes) Foreach(do func(string, *Class) bool)\n```\n\n```go\nfunc (c *Classes) GetClass(key string) (class *Class, ok bool)\n```\n\n```go\nfunc (c *Classes) UpdateClass(key string, class *Class)\n```\n\n```go\ntype Id struct {\n\tRepoIdentifier string\n\tHash           string\n\tName           string\n}\n```\n\n```go\nfunc (tcID Id) String() string\n```\n\n```go\nfunc (tcID *Id) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n```go\ntype ResourceLimits struct {\n\tCpu    *float64 `yaml:\"cpu\"`\n\tMemory *float64 `yaml:\"memory\"`\n}\n```\n\n```go\nfunc (rw *ResourceLimits) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n```go\ntype ResourceWants struct {\n\tCpu    *float64    `yaml:\"cpu\"`\n\tMemory *float64    `yaml:\"memory\"`\n\tPorts  port.Ranges `yaml:\"ports,omitempty\"`\n}\n```\n\n```go\nfunc (rw *ResourceWants) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n","path":"github.com/AliceO2Group/Control/core/task/taskclass","name":"taskclass","synopsis":"Package taskclass provides task class definitions and resource management for different types of tasks.","isRedistributable":true}
