Documentation ¶
Index ¶
- type Deduplicator
- type PostgresDeduplicator
- type Server
- func (s *Server) CancelJobSet(grpcCtx context.Context, req *api.JobSetCancelRequest) (*types.Empty, error)
- func (s *Server) CancelJobs(grpcCtx context.Context, req *api.JobCancelRequest) (*api.CancellationResult, error)
- func (s *Server) CreateQueue(grpcCtx context.Context, req *api.Queue) (*types.Empty, error)
- func (s *Server) CreateQueues(grpcCtx context.Context, req *api.QueueList) (*api.BatchQueueCreateResponse, error)
- func (s *Server) DeleteQueue(grpcCtx context.Context, req *api.QueueDeleteRequest) (*types.Empty, error)
- func (s *Server) GetQueue(grpcCtx context.Context, req *api.QueueGetRequest) (*api.Queue, error)
- func (s *Server) GetQueues(req *api.StreamingQueueGetRequest, stream api.Submit_GetQueuesServer) error
- func (s *Server) GetUser(ctx *armadacontext.Context) string
- func (s *Server) Health(_ context.Context, _ *types.Empty) (*api.HealthCheckResponse, error)
- func (s *Server) PreemptJobs(grpcCtx context.Context, req *api.JobPreemptRequest) (*types.Empty, error)
- func (s *Server) ReprioritizeJobs(grpcCtx context.Context, req *api.JobReprioritizeRequest) (*api.JobReprioritizeResponse, error)
- func (s *Server) SubmitJobs(grpcCtx context.Context, req *api.JobSubmitRequest) (*api.JobSubmitResponse, error)
- func (s *Server) UpdateQueue(grpcCtx context.Context, req *api.Queue) (*types.Empty, error)
- func (s *Server) UpdateQueues(grpcCtx context.Context, req *api.QueueList) (*api.BatchQueueUpdateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deduplicator ¶
type Deduplicator interface { GetOriginalJobIds(ctx *armadacontext.Context, queue string, jobRequests []*api.JobSubmitRequestItem) (map[string]string, error) StoreOriginalJobIds(ctx *armadacontext.Context, queue string, mappings map[string]string) error }
Deduplicator deduplicates jobs submitted ot armada in order to prevent double submission
type PostgresDeduplicator ¶
type PostgresDeduplicator struct {
// contains filtered or unexported fields
}
PostgresDeduplicator is an implementation of a Deduplicator that uses a pgkeyvalue.KeyValueStore as its state store
func NewDeduplicator ¶
func NewDeduplicator(kvStore pgkeyvalue.KeyValueStore) *PostgresDeduplicator
func (*PostgresDeduplicator) GetOriginalJobIds ¶
func (s *PostgresDeduplicator) GetOriginalJobIds(ctx *armadacontext.Context, queue string, jobRequests []*api.JobSubmitRequestItem) (map[string]string, error)
func (*PostgresDeduplicator) StoreOriginalJobIds ¶
func (s *PostgresDeduplicator) StoreOriginalJobIds(ctx *armadacontext.Context, queue string, mappings map[string]string) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a service that accepts API calls according to the original Armada submit API and publishes messages to Pulsar based on those calls.
func NewServer ¶
func NewServer( publisher pulsarutils.Publisher, queueRepository repository.QueueRepository, queueCache repository.ReadOnlyQueueRepository, jobRepository repository.JobRepository, submissionConfig configuration.SubmissionConfig, deduplicator Deduplicator, authorizer server.ActionAuthorizer, requireQueueAndJobSet bool, ) *Server
func (*Server) CancelJobSet ¶
func (*Server) CancelJobs ¶
func (s *Server) CancelJobs(grpcCtx context.Context, req *api.JobCancelRequest) (*api.CancellationResult, error)
func (*Server) CreateQueue ¶
func (*Server) CreateQueues ¶
func (*Server) DeleteQueue ¶
func (*Server) GetQueues ¶
func (s *Server) GetQueues(req *api.StreamingQueueGetRequest, stream api.Submit_GetQueuesServer) error
func (*Server) PreemptJobs ¶
func (*Server) ReprioritizeJobs ¶
func (s *Server) ReprioritizeJobs(grpcCtx context.Context, req *api.JobReprioritizeRequest) (*api.JobReprioritizeResponse, error)
func (*Server) SubmitJobs ¶
func (s *Server) SubmitJobs(grpcCtx context.Context, req *api.JobSubmitRequest) (*api.JobSubmitResponse, error)
SubmitJobs allows users to submit jobs to Armada. On receipt of a request, the following actions are performed:
- The request is validated to make sure it is well formed. If this fails then an error is returned
- Each JobRequestItem inside the request is checked to see if it is a duplicate
- Each non-duplicate is converted into an armadaevents.SubmitMessage
- All SubmitMessages are checked to see if the job they define can be scheduled (an example of a job that cannot be scheduled would be a job that requires more resources than exists on any node). If any message fails this check then an error is returned.
- The SubmitMessages are published to Pulsar.
func (*Server) UpdateQueue ¶
func (*Server) UpdateQueues ¶
Click to show internal directories.
Click to hide internal directories.