Documentation ¶
Index ¶
- type CachedQueueRepository
- type ErrQueueAlreadyExists
- type ErrQueueNotFound
- type PostgresQueueRepository
- func (r *PostgresQueueRepository) CordonQueue(ctx *armadacontext.Context, name string) error
- func (r *PostgresQueueRepository) CreateQueue(ctx *armadacontext.Context, queue queue.Queue) error
- func (r *PostgresQueueRepository) DeleteQueue(ctx *armadacontext.Context, name string) error
- func (r *PostgresQueueRepository) GetAllQueues(ctx *armadacontext.Context) ([]queue.Queue, error)
- func (r *PostgresQueueRepository) GetQueue(ctx *armadacontext.Context, name string) (queue.Queue, error)
- func (r *PostgresQueueRepository) UncordonQueue(ctx *armadacontext.Context, name string) error
- func (r *PostgresQueueRepository) UpdateQueue(ctx *armadacontext.Context, queue queue.Queue) error
- type QueueRepository
- type ReadOnlyQueueRepository
- type Server
- func (s *Server) CancelOnQueue(grpcCtx context.Context, req *api.QueueCancelRequest) (*types.Empty, error)
- func (s *Server) CordonQueue(grpcCtx context.Context, req *api.QueueCordonRequest) (*types.Empty, 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.QueueService_GetQueuesServer) error
- func (s *Server) PreemptOnQueue(grpcCtx context.Context, req *api.QueuePreemptRequest) (*types.Empty, error)
- func (s *Server) UncordonQueue(grpcCtx context.Context, req *api.QueueUncordonRequest) (*types.Empty, 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 CachedQueueRepository ¶
type CachedQueueRepository struct {
// contains filtered or unexported fields
}
CachedQueueRepository is an implementation of ReadOnlyQueueRepository that fetches ques periodically and caches them. This means the queue information may be slightly out of date but allows us to continue api operations even if the queue is unavailable
func NewCachedQueueRepository ¶
func NewCachedQueueRepository(underlyingRepo QueueRepository, updateFrequency time.Duration) *CachedQueueRepository
func (*CachedQueueRepository) GetAllQueues ¶
func (c *CachedQueueRepository) GetAllQueues(_ *armadacontext.Context) ([]queue.Queue, error)
func (*CachedQueueRepository) GetQueue ¶
func (c *CachedQueueRepository) GetQueue(_ *armadacontext.Context, name string) (queue.Queue, error)
func (*CachedQueueRepository) Run ¶
func (c *CachedQueueRepository) Run(ctx *armadacontext.Context) error
type ErrQueueAlreadyExists ¶
type ErrQueueAlreadyExists struct {
QueueName string
}
func (*ErrQueueAlreadyExists) Error ¶
func (err *ErrQueueAlreadyExists) Error() string
type ErrQueueNotFound ¶
type ErrQueueNotFound struct {
QueueName string
}
func (*ErrQueueNotFound) Error ¶
func (err *ErrQueueNotFound) Error() string
type PostgresQueueRepository ¶
type PostgresQueueRepository struct {
// contains filtered or unexported fields
}
func NewPostgresQueueRepository ¶
func NewPostgresQueueRepository(db *pgxpool.Pool) *PostgresQueueRepository
func (*PostgresQueueRepository) CordonQueue ¶
func (r *PostgresQueueRepository) CordonQueue(ctx *armadacontext.Context, name string) error
func (*PostgresQueueRepository) CreateQueue ¶
func (r *PostgresQueueRepository) CreateQueue(ctx *armadacontext.Context, queue queue.Queue) error
func (*PostgresQueueRepository) DeleteQueue ¶
func (r *PostgresQueueRepository) DeleteQueue(ctx *armadacontext.Context, name string) error
func (*PostgresQueueRepository) GetAllQueues ¶
func (r *PostgresQueueRepository) GetAllQueues(ctx *armadacontext.Context) ([]queue.Queue, error)
func (*PostgresQueueRepository) GetQueue ¶
func (r *PostgresQueueRepository) GetQueue(ctx *armadacontext.Context, name string) (queue.Queue, error)
func (*PostgresQueueRepository) UncordonQueue ¶
func (r *PostgresQueueRepository) UncordonQueue(ctx *armadacontext.Context, name string) error
func (*PostgresQueueRepository) UpdateQueue ¶
func (r *PostgresQueueRepository) UpdateQueue(ctx *armadacontext.Context, queue queue.Queue) error
type QueueRepository ¶
type QueueRepository interface { GetAllQueues(ctx *armadacontext.Context) ([]queue.Queue, error) GetQueue(ctx *armadacontext.Context, name string) (queue.Queue, error) CreateQueue(*armadacontext.Context, queue.Queue) error UpdateQueue(*armadacontext.Context, queue.Queue) error DeleteQueue(ctx *armadacontext.Context, name string) error CordonQueue(ctx *armadacontext.Context, name string) error UncordonQueue(ctx *armadacontext.Context, name string) error }
type ReadOnlyQueueRepository ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer( publisher pulsarutils.Publisher[*controlplaneevents.Event], queueRepository QueueRepository, authorizer auth.ActionAuthorizer, ) *Server
func (*Server) CancelOnQueue ¶ added in v0.15.4
func (*Server) CordonQueue ¶
func (*Server) CreateQueue ¶
func (*Server) CreateQueues ¶
func (*Server) DeleteQueue ¶
func (*Server) GetQueues ¶
func (s *Server) GetQueues(req *api.StreamingQueueGetRequest, stream api.QueueService_GetQueuesServer) error
func (*Server) PreemptOnQueue ¶ added in v0.15.4
func (*Server) UncordonQueue ¶
func (*Server) UpdateQueue ¶
func (*Server) UpdateQueues ¶
Click to show internal directories.
Click to hide internal directories.