mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 01:15:43 +03:00
23 lines
446 B
Go
23 lines
446 B
Go
package api
|
|
|
|
// ScalingPolicy is the user-specified API object for an autoscaling policy
|
|
type ScalingPolicy struct {
|
|
Policy map[string]interface{}
|
|
Enabled *bool
|
|
}
|
|
|
|
func (p *ScalingPolicy) Canonicalize() {
|
|
if p.Enabled == nil {
|
|
p.Enabled = boolToPtr(true)
|
|
}
|
|
}
|
|
|
|
// ScalingRequeset is the payload for a generic scaling action
|
|
type ScalingRequest struct {
|
|
JobID string
|
|
Value interface{}
|
|
Reason string
|
|
WriteRequest
|
|
PolicyOverride bool
|
|
}
|