Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandInstruction ¶
type CommandInstruction struct {
// contains filtered or unexported fields
}
func NewCommandInstruction ¶
func NewCommandInstruction(phase int, unitFile allocation.UnitFile, command string) *CommandInstruction
type DeleteUnitInstruction ¶
type DeleteUnitInstruction struct {
// contains filtered or unexported fields
}
DeleteUnitInstruction disables and removes unit from systemd
func NewDeleteUnitInstruction ¶
func NewDeleteUnitInstruction(unitFile allocation.UnitFile) *DeleteUnitInstruction
type DestroyBlobInstruction ¶
type DestroyBlobInstruction struct {
// contains filtered or unexported fields
}
func NewDestroyBlobInstruction ¶
func NewDestroyBlobInstruction(phase int, blob *allocation.Blob) (i *DestroyBlobInstruction)
type DisableUnitInstruction ¶
type DisableUnitInstruction struct {
// contains filtered or unexported fields
}
func NewDisableUnitInstruction ¶
func NewDisableUnitInstruction(unitFile allocation.UnitFile) *DisableUnitInstruction
type EnableUnitInstruction ¶
type EnableUnitInstruction struct {
// contains filtered or unexported fields
}
func NewEnableUnitInstruction ¶
func NewEnableUnitInstruction(unitFile allocation.UnitFile) *EnableUnitInstruction
type Evaluation ¶
type Evaluation struct { Left *allocation.Pod Right *allocation.Pod // contains filtered or unexported fields }
func NewEvaluation ¶
func NewEvaluation(left, right *allocation.Pod) (e *Evaluation)
func (*Evaluation) Explain ¶
func (e *Evaluation) Explain() string
func (*Evaluation) Name ¶
func (e *Evaluation) Name() (res string)
func (*Evaluation) Plan ¶
func (e *Evaluation) Plan() (res []Instruction)
func (*Evaluation) String ¶
func (e *Evaluation) String() (res string)
type Evaluator ¶
type Evaluator struct { *supervisor.Control // contains filtered or unexported fields }
func NewEvaluator ¶
func (*Evaluator) Deallocate ¶
func (*Evaluator) GetConstraint ¶
func (e *Evaluator) GetConstraint(pod *manifest.Pod) (res manifest.Constraint)
Returns all base constraints including resources
type EvaluatorConfig ¶
type EvaluatorConfig struct { SystemPaths allocation.SystemPaths Recovery allocation.PodSlice // recovery state StatusConsumer bus.Consumer // consumer for "evaluation.<pod>.*" }
type EvaluatorState ¶
type EvaluatorState struct {
// contains filtered or unexported fields
}
func NewEvaluatorState ¶
func NewEvaluatorState(log *logx.Log, recovered allocation.PodSlice) (s *EvaluatorState)
func (*EvaluatorState) Commit ¶
func (s *EvaluatorState) Commit(name string) (next []*Evaluation)
Commit in progress evaluation
func (*EvaluatorState) Submit ¶
func (s *EvaluatorState) Submit(name string, pod *allocation.Pod) (next []*Evaluation)
Submit allocation to state. Returns allocations ready to execute.
type Instruction ¶
Instruction represents one atomic instruction bounded to specific phase
func PlanBlob ¶
func PlanBlob(left, right *allocation.Blob) (res []Instruction)
type WriteBlobInstruction ¶
type WriteBlobInstruction struct {
// contains filtered or unexported fields
}
func NewWriteBlobInstruction ¶
func NewWriteBlobInstruction(phase int, blob *allocation.Blob) (i *WriteBlobInstruction)
type WriteUnitInstruction ¶
type WriteUnitInstruction struct {
// contains filtered or unexported fields
}
WriteUnitInstruction writes unitFile to filesystem and runs daemon reload.
func NewWriteUnitInstruction ¶
func NewWriteUnitInstruction(unitFile allocation.UnitFile) *WriteUnitInstruction
Click to show internal directories.
Click to hide internal directories.