Documentation ¶
Index ¶
- func AskAt(sys *actor.System, addr actor.Address, req interface{}, v interface{}) error
- func SlotAddr(agentID, slotID string) actor.Address
- type ResourceManager
- func (r *ResourceManager) Allocate(ctx actor.Messenger, msg sproto.AllocateRequest) error
- func (r *ResourceManager) Ask(ctx actor.Messenger, req interface{}, v interface{}) error
- func (r *ResourceManager) DeleteJob(ctx actor.Messenger, msg sproto.DeleteJob) (resp sproto.DeleteJobResponse, err error)
- func (r ResourceManager) DisableSlot(m actor.Messenger, req *apiv1.DisableSlotRequest) (resp *apiv1.DisableSlotResponse, err error)
- func (r ResourceManager) EnableSlot(m actor.Messenger, req *apiv1.EnableSlotRequest) (resp *apiv1.EnableSlotResponse, err error)
- func (r *ResourceManager) ExternalPreemptionPending(ctx actor.Messenger, msg sproto.PendingPreemption) error
- func (r *ResourceManager) GetAgents(ctx actor.Messenger, msg *apiv1.GetAgentsRequest) (resp *apiv1.GetAgentsResponse, err error)
- func (r *ResourceManager) GetAllocationHandler(ctx actor.Messenger, msg sproto.GetAllocationHandler) (resp *actor.Ref, err error)
- func (r *ResourceManager) GetAllocationSummaries(ctx actor.Messenger, msg sproto.GetAllocationSummaries) (resp map[model.AllocationID]sproto.AllocationSummary, err error)
- func (r *ResourceManager) GetAllocationSummary(ctx actor.Messenger, msg sproto.GetAllocationSummary) (resp *sproto.AllocationSummary, err error)
- func (r *ResourceManager) GetDefaultAuxResourcePool(ctx actor.Messenger, msg sproto.GetDefaultAuxResourcePoolRequest) (resp sproto.GetDefaultAuxResourcePoolResponse, err error)
- func (r *ResourceManager) GetDefaultComputeResourcePool(ctx actor.Messenger, msg sproto.GetDefaultComputeResourcePoolRequest) (resp sproto.GetDefaultComputeResourcePoolResponse, err error)
- func (r *ResourceManager) GetJobQ(ctx actor.Messenger, msg sproto.GetJobQ) (resp map[model.JobID]*sproto.RMJobInfo, err error)
- func (r *ResourceManager) GetJobQStats(ctx actor.Messenger, msg sproto.GetJobQStats) (resp *jobv1.QueueStats, err error)
- func (r *ResourceManager) GetJobQueueStatsRequest(ctx actor.Messenger, msg *apiv1.GetJobQueueStatsRequest) (resp *apiv1.GetJobQueueStatsResponse, err error)
- func (r *ResourceManager) GetResourcePoolRef(ctx actor.Messenger, name string) (*actor.Ref, error)
- func (r *ResourceManager) GetResourcePools(ctx actor.Messenger, msg *apiv1.GetResourcePoolsRequest) (resp *apiv1.GetResourcePoolsResponse, err error)
- func (r *ResourceManager) IsReattachEnabled(ctx actor.Messenger) bool
- func (r *ResourceManager) IsReattachEnabledForRP(ctx actor.Messenger, rpName string) bool
- func (r *ResourceManager) IsReattachableOnlyAfterStarted(ctx actor.Messenger) bool
- func (r *ResourceManager) MoveJob(ctx actor.Messenger, msg sproto.MoveJob) error
- func (r *ResourceManager) NotifyContainerRunning(ctx actor.Messenger, msg sproto.NotifyContainerRunning) error
- func (r *ResourceManager) RecoverJobPosition(ctx actor.Messenger, msg sproto.RecoverJobPosition)
- func (r *ResourceManager) Ref() *actor.Ref
- func (r *ResourceManager) Release(ctx actor.Messenger, msg sproto.ResourcesReleased)
- func (r *ResourceManager) ResolveResourcePool(ctx actor.Messenger, name string, slots int) (string, error)
- func (r *ResourceManager) SetAllocationName(ctx actor.Messenger, msg sproto.SetAllocationName)
- func (r *ResourceManager) SetGroupMaxSlots(ctx actor.Messenger, msg sproto.SetGroupMaxSlots)
- func (r *ResourceManager) SetGroupPriority(ctx actor.Messenger, msg sproto.SetGroupPriority) error
- func (r *ResourceManager) SetGroupWeight(ctx actor.Messenger, msg sproto.SetGroupWeight) error
- func (r ResourceManager) TaskContainerDefaults(ctx actor.Messenger, pool string, ...) (model.TaskContainerDefaultsConfig, error)
- func (r *ResourceManager) Tell(ctx actor.Messenger, req interface{})
- func (r *ResourceManager) ValidateCommandResources(ctx actor.Messenger, msg sproto.ValidateCommandResourcesRequest) (resp sproto.ValidateCommandResourcesResponse, err error)
- func (r *ResourceManager) ValidateResourcePool(ctx actor.Messenger, name string) error
- func (r *ResourceManager) ValidateResourcePoolAvailability(ctx actor.Messenger, name string, slots int) ([]command.LaunchWarning, error)
- func (r *ResourceManager) ValidateResources(ctx actor.Messenger, name string, slots int, command bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
ResourceManager shims a RM actor to the ResourceManager interface.
func Wrap ¶
func Wrap(ref *actor.Ref) *ResourceManager
Wrap wraps an RM actor as an explicit interface.
func (*ResourceManager) Allocate ¶
func (r *ResourceManager) Allocate(ctx actor.Messenger, msg sproto.AllocateRequest) error
Allocate allocates some resources.
func (*ResourceManager) Ask ¶
func (r *ResourceManager) Ask(ctx actor.Messenger, req interface{}, v interface{}) error
Ask asks the underlying actor-based RM the req, setting the response into v.
func (*ResourceManager) DeleteJob ¶
func (r *ResourceManager) DeleteJob( ctx actor.Messenger, msg sproto.DeleteJob, ) (resp sproto.DeleteJobResponse, err error)
DeleteJob requests we clean up our state related to a given job.
func (ResourceManager) DisableSlot ¶
func (r ResourceManager) DisableSlot( m actor.Messenger, req *apiv1.DisableSlotRequest, ) (resp *apiv1.DisableSlotResponse, err error)
DisableSlot implements 'det slot disable...' functionality.
func (ResourceManager) EnableSlot ¶
func (r ResourceManager) EnableSlot( m actor.Messenger, req *apiv1.EnableSlotRequest, ) (resp *apiv1.EnableSlotResponse, err error)
EnableSlot implements 'det slot enable...' functionality.
func (*ResourceManager) ExternalPreemptionPending ¶
func (r *ResourceManager) ExternalPreemptionPending( ctx actor.Messenger, msg sproto.PendingPreemption, ) error
ExternalPreemptionPending requests we notify some allocation that it was preempted externally.
func (*ResourceManager) GetAgents ¶
func (r *ResourceManager) GetAgents( ctx actor.Messenger, msg *apiv1.GetAgentsRequest, ) (resp *apiv1.GetAgentsResponse, err error)
GetAgents gets the state of connected agents or reads similar information from the underlying RM.
func (*ResourceManager) GetAllocationHandler ¶
func (r *ResourceManager) GetAllocationHandler( ctx actor.Messenger, msg sproto.GetAllocationHandler, ) (resp *actor.Ref, err error)
GetAllocationHandler requests the allocation actor for the given allocation.
func (*ResourceManager) GetAllocationSummaries ¶
func (r *ResourceManager) GetAllocationSummaries( ctx actor.Messenger, msg sproto.GetAllocationSummaries, ) (resp map[model.AllocationID]sproto.AllocationSummary, err error)
GetAllocationSummaries requests a summary of all current allocations.
func (*ResourceManager) GetAllocationSummary ¶
func (r *ResourceManager) GetAllocationSummary( ctx actor.Messenger, msg sproto.GetAllocationSummary, ) (resp *sproto.AllocationSummary, err error)
GetAllocationSummary requests a summary of the given allocation.
func (*ResourceManager) GetDefaultAuxResourcePool ¶
func (r *ResourceManager) GetDefaultAuxResourcePool( ctx actor.Messenger, msg sproto.GetDefaultAuxResourcePoolRequest, ) (resp sproto.GetDefaultAuxResourcePoolResponse, err error)
GetDefaultAuxResourcePool requests the default aux resource pool.
func (*ResourceManager) GetDefaultComputeResourcePool ¶
func (r *ResourceManager) GetDefaultComputeResourcePool( ctx actor.Messenger, msg sproto.GetDefaultComputeResourcePoolRequest, ) (resp sproto.GetDefaultComputeResourcePoolResponse, err error)
GetDefaultComputeResourcePool requests the default compute resource pool.
func (*ResourceManager) GetJobQ ¶
func (r *ResourceManager) GetJobQ( ctx actor.Messenger, msg sproto.GetJobQ, ) (resp map[model.JobID]*sproto.RMJobInfo, err error)
GetJobQ gets the state of the job queue.
func (*ResourceManager) GetJobQStats ¶
func (r *ResourceManager) GetJobQStats( ctx actor.Messenger, msg sproto.GetJobQStats, ) (resp *jobv1.QueueStats, err error)
GetJobQStats requests stats for a job queue.
func (*ResourceManager) GetJobQueueStatsRequest ¶
func (r *ResourceManager) GetJobQueueStatsRequest( ctx actor.Messenger, msg *apiv1.GetJobQueueStatsRequest, ) (resp *apiv1.GetJobQueueStatsResponse, err error)
GetJobQueueStatsRequest requests other stats for a job queue.
func (*ResourceManager) GetResourcePoolRef ¶
func (r *ResourceManager) GetResourcePoolRef( ctx actor.Messenger, name string, ) (*actor.Ref, error)
GetResourcePoolRef is a default implementation to satisfy the interface, mostly for tests.
func (*ResourceManager) GetResourcePools ¶
func (r *ResourceManager) GetResourcePools( ctx actor.Messenger, msg *apiv1.GetResourcePoolsRequest, ) (resp *apiv1.GetResourcePoolsResponse, err error)
GetResourcePools requests information about the available resource pools.
func (*ResourceManager) IsReattachEnabled ¶
func (r *ResourceManager) IsReattachEnabled(ctx actor.Messenger) bool
IsReattachEnabled is a default implementation (not Reattachable).
func (*ResourceManager) IsReattachEnabledForRP ¶
func (r *ResourceManager) IsReattachEnabledForRP(ctx actor.Messenger, rpName string) bool
IsReattachEnabledForRP is a default implementation for an RP being reattachable (false).
func (*ResourceManager) IsReattachableOnlyAfterStarted ¶
func (r *ResourceManager) IsReattachableOnlyAfterStarted(ctx actor.Messenger) bool
IsReattachableOnlyAfterStarted is a default implementation (true).
func (*ResourceManager) NotifyContainerRunning ¶
func (r *ResourceManager) NotifyContainerRunning( ctx actor.Messenger, msg sproto.NotifyContainerRunning, ) error
NotifyContainerRunning receives a notification from the container to let the master know that the container is running.
func (*ResourceManager) RecoverJobPosition ¶
func (r *ResourceManager) RecoverJobPosition( ctx actor.Messenger, msg sproto.RecoverJobPosition, )
RecoverJobPosition recovers the position of a job relative to the rest of its priority lane.
func (*ResourceManager) Ref ¶
func (r *ResourceManager) Ref() *actor.Ref
Ref gets the underlying RM actor, for backwards compatibility. This is deprecated.
func (*ResourceManager) Release ¶
func (r *ResourceManager) Release(ctx actor.Messenger, msg sproto.ResourcesReleased)
Release releases some resources.
func (*ResourceManager) ResolveResourcePool ¶
func (r *ResourceManager) ResolveResourcePool( ctx actor.Messenger, name string, slots int, ) (string, error)
ResolveResourcePool is a default implementation to satisfy the interface, mostly for tests.
func (*ResourceManager) SetAllocationName ¶
func (r *ResourceManager) SetAllocationName( ctx actor.Messenger, msg sproto.SetAllocationName, )
SetAllocationName sets a name for a given allocation.
func (*ResourceManager) SetGroupMaxSlots ¶
func (r *ResourceManager) SetGroupMaxSlots(ctx actor.Messenger, msg sproto.SetGroupMaxSlots)
SetGroupMaxSlots sets the max allocatable slots for a group.
func (*ResourceManager) SetGroupPriority ¶
func (r *ResourceManager) SetGroupPriority( ctx actor.Messenger, msg sproto.SetGroupPriority, ) error
SetGroupPriority sets the group priority.
func (*ResourceManager) SetGroupWeight ¶
func (r *ResourceManager) SetGroupWeight( ctx actor.Messenger, msg sproto.SetGroupWeight, ) error
SetGroupWeight sets the weight for a group.
func (ResourceManager) TaskContainerDefaults ¶
func (r ResourceManager) TaskContainerDefaults( ctx actor.Messenger, pool string, fallbackConfig model.TaskContainerDefaultsConfig, ) (model.TaskContainerDefaultsConfig, error)
TaskContainerDefaults returns TaskContainerDefaults for the specified pool.
func (*ResourceManager) Tell ¶
func (r *ResourceManager) Tell(ctx actor.Messenger, req interface{})
Tell tells the underlying actor-based RM the req.
func (*ResourceManager) ValidateCommandResources ¶
func (r *ResourceManager) ValidateCommandResources( ctx actor.Messenger, msg sproto.ValidateCommandResourcesRequest, ) (resp sproto.ValidateCommandResourcesResponse, err error)
ValidateCommandResources validates a request for command resources.
func (*ResourceManager) ValidateResourcePool ¶
func (r *ResourceManager) ValidateResourcePool(ctx actor.Messenger, name string) error
ValidateResourcePool is a default implementation to satisfy the interface, mostly for tests.
func (*ResourceManager) ValidateResourcePoolAvailability ¶
func (r *ResourceManager) ValidateResourcePoolAvailability( ctx actor.Messenger, name string, slots int) ( []command.LaunchWarning, error, )
ValidateResourcePoolAvailability is a default implementation to satisfy the interface.
func (*ResourceManager) ValidateResources ¶
func (r *ResourceManager) ValidateResources( ctx actor.Messenger, name string, slots int, command bool, ) error
ValidateResources is a default implementation to satisfy the interface, mostly for tests.