Documentation ¶
Index ¶
- type ResourceManager
- func (r *ResourceManager) Allocate(msg sproto.AllocateRequest) (*sproto.ResourcesSubscription, error)
- func (r *ResourceManager) Ask(req interface{}, v interface{}) error
- func (r *ResourceManager) AskAt(addr actor.Address, req interface{}, v interface{}) error
- func (r *ResourceManager) DeleteJob(msg sproto.DeleteJob) (resp sproto.DeleteJobResponse, err error)
- func (r *ResourceManager) DisableAgent(req *apiv1.DisableAgentRequest) (resp *apiv1.DisableAgentResponse, err error)
- func (r ResourceManager) DisableSlot(req *apiv1.DisableSlotRequest) (resp *apiv1.DisableSlotResponse, err error)
- func (r *ResourceManager) EnableAgent(req *apiv1.EnableAgentRequest) (resp *apiv1.EnableAgentResponse, err error)
- func (r ResourceManager) EnableSlot(req *apiv1.EnableSlotRequest) (resp *apiv1.EnableSlotResponse, err error)
- func (r *ResourceManager) ExternalPreemptionPending(msg sproto.PendingPreemption) error
- func (r *ResourceManager) GetAgent(req *apiv1.GetAgentRequest) (resp *apiv1.GetAgentResponse, err error)
- func (r *ResourceManager) GetAgents(msg *apiv1.GetAgentsRequest) (resp *apiv1.GetAgentsResponse, err error)
- func (r *ResourceManager) GetAllocationSummaries(msg sproto.GetAllocationSummaries) (resp map[model.AllocationID]sproto.AllocationSummary, err error)
- func (r *ResourceManager) GetAllocationSummary(msg sproto.GetAllocationSummary) (resp *sproto.AllocationSummary, err error)
- func (r *ResourceManager) GetDefaultAuxResourcePool(msg sproto.GetDefaultAuxResourcePoolRequest) (resp sproto.GetDefaultAuxResourcePoolResponse, err error)
- func (r *ResourceManager) GetDefaultComputeResourcePool(msg sproto.GetDefaultComputeResourcePoolRequest) (resp sproto.GetDefaultComputeResourcePoolResponse, err error)
- func (r *ResourceManager) GetExternalJobs(msg sproto.GetExternalJobs) (resp []*jobv1.Job, err error)
- func (r *ResourceManager) GetJobQ(msg sproto.GetJobQ) (resp map[model.JobID]*sproto.RMJobInfo, err error)
- func (r *ResourceManager) GetJobQueueStatsRequest(msg *apiv1.GetJobQueueStatsRequest) (resp *apiv1.GetJobQueueStatsResponse, err error)
- func (r *ResourceManager) GetResourcePools(msg *apiv1.GetResourcePoolsRequest) (resp *apiv1.GetResourcePoolsResponse, err error)
- func (r *ResourceManager) GetSlot(req *apiv1.GetSlotRequest) (resp *apiv1.GetSlotResponse, err error)
- func (r *ResourceManager) GetSlots(req *apiv1.GetSlotsRequest) (resp *apiv1.GetSlotsResponse, err error)
- func (r *ResourceManager) IsReattachableOnlyAfterStarted() bool
- func (r *ResourceManager) MoveJob(msg sproto.MoveJob) error
- func (r *ResourceManager) NotifyContainerRunning(msg sproto.NotifyContainerRunning) error
- func (r *ResourceManager) RecoverJobPosition(msg sproto.RecoverJobPosition)
- func (r *ResourceManager) Ref() *actor.Ref
- func (r *ResourceManager) Release(msg sproto.ResourcesReleased)
- func (r *ResourceManager) ResolveResourcePool(name string, workspaceID, slots int) (string, error)
- func (r *ResourceManager) SetAllocationName(msg sproto.SetAllocationName)
- func (r *ResourceManager) SetGroupMaxSlots(msg sproto.SetGroupMaxSlots)
- func (r *ResourceManager) SetGroupPriority(msg sproto.SetGroupPriority) error
- func (r *ResourceManager) SetGroupWeight(msg sproto.SetGroupWeight) error
- func (r ResourceManager) TaskContainerDefaults(pool string, fallbackConfig model.TaskContainerDefaultsConfig) (model.TaskContainerDefaultsConfig, error)
- func (r *ResourceManager) Tell(req interface{})
- func (r *ResourceManager) ValidateCommandResources(msg sproto.ValidateCommandResourcesRequest) (resp sproto.ValidateCommandResourcesResponse, err error)
- func (r *ResourceManager) ValidateResourcePool(name string) error
- func (r *ResourceManager) ValidateResourcePoolAvailability(name string, slots int) ([]command.LaunchWarning, error)
- func (r *ResourceManager) ValidateResources(name string, slots int, command bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
ResourceManager shims a deprecated RM actor to the ResourceManager interface.
func Wrap ¶
func Wrap(ref *actor.Ref) *ResourceManager
Wrap wraps an RM actor as an explicit interface. This is deprecated. New resource managers should satisfy the ResourceManager interface directly.
func (*ResourceManager) Allocate ¶
func (r *ResourceManager) Allocate( msg sproto.AllocateRequest, ) (*sproto.ResourcesSubscription, error)
Allocate allocates some resources.
func (*ResourceManager) Ask ¶
func (r *ResourceManager) Ask(req interface{}, v interface{}) error
Ask asks the underlying actor-based RM the req, setting the response into v.
func (*ResourceManager) AskAt ¶
func (r *ResourceManager) AskAt(addr actor.Address, req interface{}, v interface{}) error
AskAt asks an actor and sets the response in v. It returns an error if the actor doesn't respond, respond with an error, or v isn't settable. TODO(Brad): Consolidate occurrences of this code.
func (*ResourceManager) DeleteJob ¶
func (r *ResourceManager) DeleteJob( msg sproto.DeleteJob, ) (resp sproto.DeleteJobResponse, err error)
DeleteJob requests we clean up our state related to a given job.
func (*ResourceManager) DisableAgent ¶
func (r *ResourceManager) DisableAgent( req *apiv1.DisableAgentRequest, ) (resp *apiv1.DisableAgentResponse, err error)
DisableAgent implements rm.ResourceManager.
func (ResourceManager) DisableSlot ¶
func (r ResourceManager) DisableSlot( req *apiv1.DisableSlotRequest, ) (resp *apiv1.DisableSlotResponse, err error)
DisableSlot implements 'det slot disable...' functionality.
func (*ResourceManager) EnableAgent ¶
func (r *ResourceManager) EnableAgent( req *apiv1.EnableAgentRequest, ) (resp *apiv1.EnableAgentResponse, err error)
EnableAgent implements rm.ResourceManager.
func (ResourceManager) EnableSlot ¶
func (r ResourceManager) EnableSlot( req *apiv1.EnableSlotRequest, ) (resp *apiv1.EnableSlotResponse, err error)
EnableSlot implements 'det slot enable...' functionality.
func (*ResourceManager) ExternalPreemptionPending ¶
func (r *ResourceManager) ExternalPreemptionPending( msg sproto.PendingPreemption, ) error
ExternalPreemptionPending requests we notify some allocation that it was preempted externally.
func (*ResourceManager) GetAgent ¶
func (r *ResourceManager) GetAgent( req *apiv1.GetAgentRequest, ) (resp *apiv1.GetAgentResponse, err error)
GetAgent implements rm.ResourceManager.
func (*ResourceManager) GetAgents ¶
func (r *ResourceManager) GetAgents( 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) GetAllocationSummaries ¶
func (r *ResourceManager) GetAllocationSummaries( 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( msg sproto.GetAllocationSummary, ) (resp *sproto.AllocationSummary, err error)
GetAllocationSummary requests a summary of the given allocation.
func (*ResourceManager) GetDefaultAuxResourcePool ¶
func (r *ResourceManager) GetDefaultAuxResourcePool( msg sproto.GetDefaultAuxResourcePoolRequest, ) (resp sproto.GetDefaultAuxResourcePoolResponse, err error)
GetDefaultAuxResourcePool requests the default aux resource pool.
func (*ResourceManager) GetDefaultComputeResourcePool ¶
func (r *ResourceManager) GetDefaultComputeResourcePool( msg sproto.GetDefaultComputeResourcePoolRequest, ) (resp sproto.GetDefaultComputeResourcePoolResponse, err error)
GetDefaultComputeResourcePool requests the default compute resource pool.
func (*ResourceManager) GetExternalJobs ¶
func (r *ResourceManager) GetExternalJobs( msg sproto.GetExternalJobs, ) (resp []*jobv1.Job, err error)
GetExternalJobs returns the details for External jobs.
func (*ResourceManager) GetJobQ ¶
func (r *ResourceManager) GetJobQ( msg sproto.GetJobQ, ) (resp map[model.JobID]*sproto.RMJobInfo, err error)
GetJobQ gets the state of the job queue.
func (*ResourceManager) GetJobQueueStatsRequest ¶
func (r *ResourceManager) GetJobQueueStatsRequest( msg *apiv1.GetJobQueueStatsRequest, ) (resp *apiv1.GetJobQueueStatsResponse, err error)
GetJobQueueStatsRequest requests other stats for a job queue.
func (*ResourceManager) GetResourcePools ¶
func (r *ResourceManager) GetResourcePools( msg *apiv1.GetResourcePoolsRequest, ) (resp *apiv1.GetResourcePoolsResponse, err error)
GetResourcePools requests information about the available resource pools.
func (*ResourceManager) GetSlot ¶
func (r *ResourceManager) GetSlot( req *apiv1.GetSlotRequest, ) (resp *apiv1.GetSlotResponse, err error)
GetSlot implements rm.ResourceManager.
func (*ResourceManager) GetSlots ¶
func (r *ResourceManager) GetSlots( req *apiv1.GetSlotsRequest, ) (resp *apiv1.GetSlotsResponse, err error)
GetSlots implements rm.ResourceManager.
func (*ResourceManager) IsReattachableOnlyAfterStarted ¶
func (r *ResourceManager) IsReattachableOnlyAfterStarted() bool
IsReattachableOnlyAfterStarted is a default implementation (true).
func (*ResourceManager) MoveJob ¶
func (r *ResourceManager) MoveJob(msg sproto.MoveJob) error
MoveJob moves a job ahead of or behind a peer.
func (*ResourceManager) NotifyContainerRunning ¶
func (r *ResourceManager) NotifyContainerRunning( 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( 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 internal actor use only.
func (*ResourceManager) Release ¶
func (r *ResourceManager) Release(msg sproto.ResourcesReleased)
Release releases some resources.
func (*ResourceManager) ResolveResourcePool ¶
func (r *ResourceManager) ResolveResourcePool( name string, workspaceID, slots int, ) (string, error)
ResolveResourcePool is a default implementation to satisfy the interface, mostly for tests.
func (*ResourceManager) SetAllocationName ¶
func (r *ResourceManager) SetAllocationName( msg sproto.SetAllocationName, )
SetAllocationName sets a name for a given allocation.
func (*ResourceManager) SetGroupMaxSlots ¶
func (r *ResourceManager) SetGroupMaxSlots(msg sproto.SetGroupMaxSlots)
SetGroupMaxSlots sets the max allocatable slots for a group.
func (*ResourceManager) SetGroupPriority ¶
func (r *ResourceManager) SetGroupPriority(msg sproto.SetGroupPriority) error
SetGroupPriority sets the group priority.
func (*ResourceManager) SetGroupWeight ¶
func (r *ResourceManager) SetGroupWeight(msg sproto.SetGroupWeight) error
SetGroupWeight sets the weight for a group.
func (ResourceManager) TaskContainerDefaults ¶
func (r ResourceManager) TaskContainerDefaults( pool string, fallbackConfig model.TaskContainerDefaultsConfig, ) (model.TaskContainerDefaultsConfig, error)
TaskContainerDefaults returns TaskContainerDefaults for the specified pool.
func (*ResourceManager) Tell ¶
func (r *ResourceManager) Tell(req interface{})
Tell tells the underlying actor-based RM the req.
func (*ResourceManager) ValidateCommandResources ¶
func (r *ResourceManager) ValidateCommandResources( msg sproto.ValidateCommandResourcesRequest, ) (resp sproto.ValidateCommandResourcesResponse, err error)
ValidateCommandResources validates a request for command resources.
func (*ResourceManager) ValidateResourcePool ¶
func (r *ResourceManager) ValidateResourcePool(name string) error
ValidateResourcePool is a default implementation to satisfy the interface, mostly for tests.
func (*ResourceManager) ValidateResourcePoolAvailability ¶
func (r *ResourceManager) ValidateResourcePoolAvailability( name string, slots int) ( []command.LaunchWarning, error, )
ValidateResourcePoolAvailability is a default implementation to satisfy the interface.
func (*ResourceManager) ValidateResources ¶
func (r *ResourceManager) ValidateResources( name string, slots int, command bool, ) error
ValidateResources is a default implementation to satisfy the interface, mostly for tests.