repository

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedQueueRepository added in v0.4.48

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 added in v0.4.48

func NewCachedQueueRepository(underlyingRepo QueueRepository, updateFrequency time.Duration) *CachedQueueRepository

func (*CachedQueueRepository) GetAllQueues added in v0.4.48

func (c *CachedQueueRepository) GetAllQueues(_ *armadacontext.Context) ([]queue.Queue, error)

func (*CachedQueueRepository) GetQueue added in v0.4.48

func (*CachedQueueRepository) Run added in v0.4.48

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 added in v0.4.48

type PostgresQueueRepository struct {
	// contains filtered or unexported fields
}

func NewPostgresQueueRepository added in v0.4.48

func NewPostgresQueueRepository(db *pgxpool.Pool) *PostgresQueueRepository

func (*PostgresQueueRepository) CreateQueue added in v0.4.48

func (r *PostgresQueueRepository) CreateQueue(ctx *armadacontext.Context, queue queue.Queue) error

func (*PostgresQueueRepository) DeleteQueue added in v0.4.48

func (r *PostgresQueueRepository) DeleteQueue(ctx *armadacontext.Context, name string) error

func (*PostgresQueueRepository) GetAllQueues added in v0.4.48

func (r *PostgresQueueRepository) GetAllQueues(ctx *armadacontext.Context) ([]queue.Queue, error)

func (*PostgresQueueRepository) GetQueue added in v0.4.48

func (*PostgresQueueRepository) UpdateQueue added in v0.4.48

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
}

type ReadOnlyQueueRepository added in v0.4.48

type ReadOnlyQueueRepository interface {
	GetAllQueues(ctx *armadacontext.Context) ([]queue.Queue, error)
	GetQueue(ctx *armadacontext.Context, name string) (queue.Queue, error)
}

type RedisHealth

type RedisHealth struct {
	// contains filtered or unexported fields
}

func NewRedisHealth

func NewRedisHealth(db redis.UniversalClient) *RedisHealth

func (*RedisHealth) Check

func (r *RedisHealth) Check() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL