Documentation
¶
Index ¶
- func ContextWithMap(ctx context.Context, m map[string]string) context.Context
- type CtxKey
- type CycleState
- func (c *CycleState) Error() error
- func (c *CycleState) IsCompleted() bool
- func (c *CycleState) Messages() map[string]string
- func (c *CycleState) Result() SchedulerResult
- func (c *CycleState) SetComplete()
- func (c *CycleState) SetError(err error)
- func (c *CycleState) SetMessage(pluginName, message string)
- func (c *CycleState) UpdateState(completed bool, err error, result SchedulerResult)
- type NodeFilterPlugin
- type NodeInfo
- type NodeScore
- type NodeScoreList
- type NodeScorePlugin
- type Plugin
- type SchedulerResult
- type Status
- type VMIDPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CycleState ¶
type CycleState struct {
// contains filtered or unexported fields
}
func NewCycleState ¶
func NewCycleState() CycleState
func (*CycleState) Error ¶
func (c *CycleState) Error() error
func (*CycleState) IsCompleted ¶
func (c *CycleState) IsCompleted() bool
func (*CycleState) Messages ¶
func (c *CycleState) Messages() map[string]string
func (*CycleState) Result ¶
func (c *CycleState) Result() SchedulerResult
func (*CycleState) SetComplete ¶
func (c *CycleState) SetComplete()
func (*CycleState) SetError ¶
func (c *CycleState) SetError(err error)
func (*CycleState) SetMessage ¶
func (c *CycleState) SetMessage(pluginName, message string)
func (*CycleState) UpdateState ¶
func (c *CycleState) UpdateState(completed bool, err error, result SchedulerResult)
type NodeFilterPlugin ¶
type NodeFilterPlugin interface { Plugin Filter(ctx context.Context, state *CycleState, config api.VirtualMachineCreateOptions, nodeInfo *NodeInfo) *Status }
type NodeInfo ¶
type NodeInfo struct {
// contains filtered or unexported fields
}
NodeInfo is node level aggregated information
func GetNodeInfoList ¶
func (NodeInfo) QEMUs ¶
func (n NodeInfo) QEMUs() []*api.VirtualMachine
type NodeScoreList ¶
type NodeScoreList []NodeScore
NodeScoreList declares a list of nodes and their scores.
type NodeScorePlugin ¶
type NodeScorePlugin interface { Plugin Score(ctx context.Context, state *CycleState, config api.VirtualMachineCreateOptions, nodeInfo *NodeInfo) (int64, *Status) }
type SchedulerResult ¶
type SchedulerResult struct {
// contains filtered or unexported fields
}
func NewSchedulerResult ¶
func NewSchedulerResult(vmid int, node string, storage string) SchedulerResult
func (*SchedulerResult) Node ¶
func (r *SchedulerResult) Node() string
func (*SchedulerResult) Storage ¶ added in v0.3.7
func (r *SchedulerResult) Storage() string
func (*SchedulerResult) VMID ¶
func (r *SchedulerResult) VMID() int
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) FailedPlugin ¶
func (*Status) SetFailedPlugin ¶
type VMIDPlugin ¶
Click to show internal directories.
Click to hide internal directories.