mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
jobspec: define DiffID for Constraint and Affinity (#26134)
This commit is contained in:
@@ -9954,6 +9954,11 @@ func (c *Constraint) Validate() error {
|
||||
return mErr.ErrorOrNil()
|
||||
}
|
||||
|
||||
// DiffID fulfills the DiffableWithID interface.
|
||||
func (c *Constraint) DiffID() string {
|
||||
return c.String()
|
||||
}
|
||||
|
||||
type Constraints []*Constraint
|
||||
|
||||
// Equal compares Constraints as a set
|
||||
@@ -10070,6 +10075,11 @@ func (a *Affinity) Validate() error {
|
||||
return mErr.ErrorOrNil()
|
||||
}
|
||||
|
||||
// DiffID fulfills the DiffableWithID interface.
|
||||
func (a *Affinity) DiffID() string {
|
||||
return a.String()
|
||||
}
|
||||
|
||||
// Spread is used to specify desired distribution of allocations according to weight
|
||||
type Spread struct {
|
||||
// Attribute is the node attribute used as the spread criteria
|
||||
|
||||
Reference in New Issue
Block a user