open-nomad/client/interfaces/client.go
Michael Schurter 357641c364 persist alloc state on changes, not periodically
Allow alloc and task runners to persist their own state when something
changes instead of periodically syncing all state.
2018-10-16 16:53:30 -07:00

15 lines
419 B
Go

package interfaces
import "github.com/hashicorp/nomad/nomad/structs"
type Client interface {
AllocStateHandler
}
// AllocStateHandler exposes a handler to be called when a allocation's state changes
type AllocStateHandler interface {
// AllocStateUpdated is used to emit an updated allocation. This allocation
// is stripped to only include client settable fields.
AllocStateUpdated(alloc *structs.Allocation)
}