{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package constraint\n\nPackage constraint implements support for predicates on agent attributes. Constraints notably implement a MergeParent operation, to implement override behavior in child Roles.\n\n## Types\n\n```go\ntype Attributes []mesos.Attribute\n```\n\n```go\nfunc (attrs Attributes) Get(attributeName string) (value string, ok bool)\n```\n\n```go\nfunc (attrs Attributes) Satisfy(cts Constraints) (ok bool)\n```\n\n```go\nfunc (attrs Attributes) String() string\n```\n\n```go\ntype Constraint struct {\n\tAttribute string `yaml:\"attribute\"`\n\tValue     string `yaml:\"value\"`\n\t// TODO: unmarshal this ↓\n\tOperator Operator\n}\n```\n\n```go\nfunc (c *Constraint) String() string\n```\n\n```go\ntype Constraints []Constraint\n```\n\n```go\nfunc (cts Constraints) MergeParent(parentConstraints Constraints) (merged Constraints)\n```\n\n```go\nfunc (cts Constraints) String() string\n```\n\n```go\ntype Operator int8\n```\n\n```go\nconst (\n\tEquals Operator = 0\n)\n```\n\n```go\nfunc (o Operator) String() string\n```\n\n","path":"github.com/AliceO2Group/Control/core/task/constraint","name":"constraint","synopsis":"Package constraint implements support for predicates on agent attributes.","isRedistributable":true}
