Documentation
¶
Index ¶
- type Manager
- func (m *Manager) AddNode(ctx context.Context, nodename string, opts resourcetypes.Resources, ...) (resourcetypes.Resources, error)
- func (m *Manager) AddPlugins(ps ...plugins.Plugin)
- func (m *Manager) Alloc(ctx context.Context, nodename string, deployCount int, ...) ([]resourcetypes.Resources, []resourcetypes.Resources, error)
- func (m *Manager) GetMetricsDescription(ctx context.Context) ([]*plugintypes.MetricsDescription, error)
- func (m *Manager) GetMostIdleNode(ctx context.Context, nodenames []string) (string, error)
- func (m *Manager) GetNodeResourceInfo(ctx context.Context, nodename string, workloads []*types.Workload, fix bool) (resourcetypes.Resources, resourcetypes.Resources, []string, error)
- func (m *Manager) GetNodesDeployCapacity(ctx context.Context, nodenames []string, opts resourcetypes.Resources) (map[string]*plugintypes.NodeDeployCapacity, int, error)
- func (m *Manager) GetNodesMetrics(ctx context.Context, nodes []*types.Node) ([]*plugintypes.Metrics, error)
- func (m *Manager) GetNodesResourceInfo(ctx context.Context, nodenames []string) (map[string]*types.NodeResourceInfo, error)
- func (m *Manager) LoadPlugins(ctx context.Context, store store.Store) error
- func (m *Manager) Realloc(ctx context.Context, nodename string, ...) (resourcetypes.Resources, resourcetypes.Resources, resourcetypes.Resources, ...)
- func (m *Manager) Remap(ctx context.Context, nodename string, workloads []*types.Workload) (map[string]resourcetypes.Resources, error)
- func (m *Manager) RemoveNode(ctx context.Context, nodename string) error
- func (m *Manager) RollbackAlloc(ctx context.Context, nodename string, ...) error
- func (m *Manager) RollbackRealloc(ctx context.Context, nodename string, workloadParams resourcetypes.Resources) error
- func (m *Manager) SetNodeResourceCapacity(ctx context.Context, nodename string, ...) (resourcetypes.Resources, resourcetypes.Resources, error)
- func (m *Manager) SetNodeResourceUsage(ctx context.Context, nodename string, ...) (resourcetypes.Resources, resourcetypes.Resources, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager fans resource operations out to the loaded plugins.
func (*Manager) AddNode ¶
func (m *Manager) AddNode(ctx context.Context, nodename string, opts resourcetypes.Resources, nodeInfo *enginetypes.Info) (resourcetypes.Resources, error)
func (*Manager) AddPlugins ¶
func (*Manager) Alloc ¶
func (m *Manager) Alloc(ctx context.Context, nodename string, deployCount int, opts resourcetypes.Resources) ([]resourcetypes.Resources, []resourcetypes.Resources, error)
Alloc allocates resource for deployCount workloads on nodename, keyed by plugin name in opts.
func (*Manager) GetMetricsDescription ¶
func (m *Manager) GetMetricsDescription(ctx context.Context) ([]*plugintypes.MetricsDescription, error)
func (*Manager) GetMostIdleNode ¶
func (*Manager) GetNodeResourceInfo ¶
func (*Manager) GetNodesDeployCapacity ¶
func (m *Manager) GetNodesDeployCapacity(ctx context.Context, nodenames []string, opts resourcetypes.Resources) (map[string]*plugintypes.NodeDeployCapacity, int, error)
func (*Manager) GetNodesMetrics ¶ added in v0.1.4
func (*Manager) GetNodesResourceInfo ¶ added in v0.1.5
func (*Manager) LoadPlugins ¶
func (*Manager) Realloc ¶
func (m *Manager) Realloc(ctx context.Context, nodename string, nodeResource, opts resourcetypes.Resources) (resourcetypes.Resources, resourcetypes.Resources, resourcetypes.Resources, error)
func (*Manager) Remap ¶
func (m *Manager) Remap(ctx context.Context, nodename string, workloads []*types.Workload) (map[string]resourcetypes.Resources, error)
Remap returns engine params per workload and never changes resource params.
func (*Manager) RemoveNode ¶
func (*Manager) RollbackAlloc ¶
func (m *Manager) RollbackAlloc(ctx context.Context, nodename string, workloadsParams []resourcetypes.Resources) error
RollbackAlloc returns the allocated resource to the node.
func (*Manager) RollbackRealloc ¶
func (*Manager) SetNodeResourceCapacity ¶
func (m *Manager) SetNodeResourceCapacity(ctx context.Context, nodename string, nodeResource, nodeResourceRequest resourcetypes.Resources, delta, incr bool) (resourcetypes.Resources, resourcetypes.Resources, error)
func (*Manager) SetNodeResourceUsage ¶
func (m *Manager) SetNodeResourceUsage(ctx context.Context, nodename string, nodeResource, nodeResourceRequest resourcetypes.Resources, workloadsResource []resourcetypes.Resources, delta, incr bool) (resourcetypes.Resources, resourcetypes.Resources, error)
Click to show internal directories.
Click to hide internal directories.