Documentation ¶
Index ¶
- type Local
- func (l *Local) CurrentlyQueuedTasksCount(_ context.Context) (count uint64, err error)
- func (l *Local) DelEnvironment(_ context.Context, k schemas.EnvironmentKey) error
- func (l *Local) DelMetric(_ context.Context, k schemas.MetricKey) error
- func (l *Local) DelProject(_ context.Context, k schemas.ProjectKey) error
- func (l *Local) DelRef(_ context.Context, k schemas.RefKey) error
- func (l *Local) EnvironmentExists(_ context.Context, k schemas.EnvironmentKey) (bool, error)
- func (l *Local) Environments(_ context.Context) (environments schemas.Environments, err error)
- func (l *Local) EnvironmentsCount(_ context.Context) (int64, error)
- func (l *Local) ExecutedTasksCount(_ context.Context) (uint64, error)
- func (l *Local) GetEnvironment(ctx context.Context, environment *schemas.Environment) error
- func (l *Local) GetMetric(ctx context.Context, m *schemas.Metric) error
- func (l *Local) GetProject(ctx context.Context, p *schemas.Project) error
- func (l *Local) GetRef(ctx context.Context, ref *schemas.Ref) error
- func (l *Local) MetricExists(_ context.Context, k schemas.MetricKey) (bool, error)
- func (l *Local) Metrics(_ context.Context) (metrics schemas.Metrics, err error)
- func (l *Local) MetricsCount(_ context.Context) (int64, error)
- func (l *Local) ProjectExists(_ context.Context, k schemas.ProjectKey) (bool, error)
- func (l *Local) Projects(_ context.Context) (projects schemas.Projects, err error)
- func (l *Local) ProjectsCount(_ context.Context) (int64, error)
- func (l *Local) QueueTask(_ context.Context, tt schemas.TaskType, uniqueID, _ string) (bool, error)
- func (l *Local) RefExists(_ context.Context, k schemas.RefKey) (bool, error)
- func (l *Local) Refs(_ context.Context) (refs schemas.Refs, err error)
- func (l *Local) RefsCount(_ context.Context) (int64, error)
- func (l *Local) SetEnvironment(_ context.Context, environment schemas.Environment) error
- func (l *Local) SetMetric(_ context.Context, m schemas.Metric) error
- func (l *Local) SetProject(_ context.Context, p schemas.Project) error
- func (l *Local) SetRef(_ context.Context, ref schemas.Ref) error
- func (l *Local) UnqueueTask(_ context.Context, tt schemas.TaskType, uniqueID string) error
- type Redis
- func (r *Redis) CurrentlyQueuedTasksCount(ctx context.Context) (count uint64, err error)
- func (r *Redis) DelEnvironment(ctx context.Context, k schemas.EnvironmentKey) error
- func (r *Redis) DelMetric(ctx context.Context, k schemas.MetricKey) error
- func (r *Redis) DelProject(ctx context.Context, k schemas.ProjectKey) error
- func (r *Redis) DelRef(ctx context.Context, k schemas.RefKey) error
- func (r *Redis) EnvironmentExists(ctx context.Context, k schemas.EnvironmentKey) (bool, error)
- func (r *Redis) Environments(ctx context.Context) (schemas.Environments, error)
- func (r *Redis) EnvironmentsCount(ctx context.Context) (int64, error)
- func (r *Redis) ExecutedTasksCount(ctx context.Context) (uint64, error)
- func (r *Redis) GetEnvironment(ctx context.Context, e *schemas.Environment) error
- func (r *Redis) GetMetric(ctx context.Context, m *schemas.Metric) error
- func (r *Redis) GetProject(ctx context.Context, p *schemas.Project) error
- func (r *Redis) GetRef(ctx context.Context, ref *schemas.Ref) error
- func (r *Redis) KeepaliveExists(ctx context.Context, uuid string) (bool, error)
- func (r *Redis) MetricExists(ctx context.Context, k schemas.MetricKey) (bool, error)
- func (r *Redis) Metrics(ctx context.Context) (schemas.Metrics, error)
- func (r *Redis) MetricsCount(ctx context.Context) (int64, error)
- func (r *Redis) ProjectExists(ctx context.Context, k schemas.ProjectKey) (bool, error)
- func (r *Redis) Projects(ctx context.Context) (schemas.Projects, error)
- func (r *Redis) ProjectsCount(ctx context.Context) (int64, error)
- func (r *Redis) QueueTask(ctx context.Context, tt schemas.TaskType, taskUUID, processUUID string) (set bool, err error)
- func (r *Redis) RefExists(ctx context.Context, k schemas.RefKey) (bool, error)
- func (r *Redis) Refs(ctx context.Context) (schemas.Refs, error)
- func (r *Redis) RefsCount(ctx context.Context) (int64, error)
- func (r *Redis) SetEnvironment(ctx context.Context, e schemas.Environment) error
- func (r *Redis) SetKeepalive(ctx context.Context, uuid string, ttl time.Duration) (bool, error)
- func (r *Redis) SetMetric(ctx context.Context, m schemas.Metric) error
- func (r *Redis) SetProject(ctx context.Context, p schemas.Project) error
- func (r *Redis) SetRef(ctx context.Context, ref schemas.Ref) error
- func (r *Redis) UnqueueTask(ctx context.Context, tt schemas.TaskType, taskUUID string) (err error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local ..
func (*Local) CurrentlyQueuedTasksCount ¶ added in v0.5.1
CurrentlyQueuedTasksCount ..
func (*Local) DelEnvironment ¶
DelEnvironment ..
func (*Local) DelProject ¶
DelProject ..
func (*Local) EnvironmentExists ¶
EnvironmentExists ..
func (*Local) Environments ¶
Environments ..
func (*Local) EnvironmentsCount ¶
EnvironmentsCount ..
func (*Local) ExecutedTasksCount ¶ added in v0.5.1
ExecutedTasksCount ..
func (*Local) GetEnvironment ¶
GetEnvironment ..
func (*Local) GetProject ¶
GetProject ..
func (*Local) MetricExists ¶
MetricExists ..
func (*Local) MetricsCount ¶
MetricsCount ..
func (*Local) ProjectExists ¶
ProjectExists ..
func (*Local) ProjectsCount ¶
ProjectsCount ..
func (*Local) QueueTask ¶ added in v0.5.1
QueueTask registers that we are queueing the task. It returns true if it managed to schedule it, false if it was already scheduled.
func (*Local) SetEnvironment ¶
SetEnvironment ..
func (*Local) SetProject ¶
SetProject ..
type Redis ¶
type Redis struct {
*redis.Client
}
Redis ..
func (*Redis) CurrentlyQueuedTasksCount ¶ added in v0.5.1
CurrentlyQueuedTasksCount ..
func (*Redis) DelEnvironment ¶
DelEnvironment ..
func (*Redis) DelProject ¶
DelProject ..
func (*Redis) EnvironmentExists ¶
EnvironmentExists ..
func (*Redis) Environments ¶
Environments ..
func (*Redis) EnvironmentsCount ¶
EnvironmentsCount ..
func (*Redis) ExecutedTasksCount ¶ added in v0.5.1
ExecutedTasksCount ..
func (*Redis) GetEnvironment ¶
GetEnvironment ..
func (*Redis) GetProject ¶
GetProject ..
func (*Redis) KeepaliveExists ¶ added in v0.5.3
KeepaliveExists returns whether a keepalive exists or not for a particular UUID.
func (*Redis) MetricExists ¶
MetricExists ..
func (*Redis) MetricsCount ¶
MetricsCount ..
func (*Redis) ProjectExists ¶
ProjectExists ..
func (*Redis) ProjectsCount ¶
ProjectsCount ..
func (*Redis) QueueTask ¶ added in v0.5.1
func (r *Redis) QueueTask(ctx context.Context, tt schemas.TaskType, taskUUID, processUUID string) (set bool, err error)
QueueTask registers that we are queueing the task. It returns true if it managed to schedule it, false if it was already scheduled.
func (*Redis) SetEnvironment ¶
SetEnvironment ..
func (*Redis) SetKeepalive ¶ added in v0.5.3
SetKeepalive sets a key with an UUID corresponding to the currently running process.
func (*Redis) SetProject ¶
SetProject ..
type Store ¶
type Store interface { SetProject(context.Context, schemas.Project) error DelProject(context.Context, schemas.ProjectKey) error GetProject(context.Context, *schemas.Project) error ProjectExists(context.Context, schemas.ProjectKey) (bool, error) Projects(context.Context) (schemas.Projects, error) ProjectsCount(context.Context) (int64, error) SetEnvironment(context.Context, schemas.Environment) error DelEnvironment(context.Context, schemas.EnvironmentKey) error GetEnvironment(context.Context, *schemas.Environment) error EnvironmentExists(context.Context, schemas.EnvironmentKey) (bool, error) Environments(context.Context) (schemas.Environments, error) EnvironmentsCount(context.Context) (int64, error) SetRef(context.Context, schemas.Ref) error DelRef(context.Context, schemas.RefKey) error GetRef(context.Context, *schemas.Ref) error RefExists(context.Context, schemas.RefKey) (bool, error) Refs(context.Context) (schemas.Refs, error) RefsCount(context.Context) (int64, error) SetMetric(context.Context, schemas.Metric) error DelMetric(context.Context, schemas.MetricKey) error GetMetric(context.Context, *schemas.Metric) error MetricExists(context.Context, schemas.MetricKey) (bool, error) Metrics(context.Context) (schemas.Metrics, error) MetricsCount(context.Context) (int64, error) // Helpers to keep track of currently queued tasks and avoid scheduling them // twice at the risk of ending up with loads of dangling goroutines being locked QueueTask(context.Context, schemas.TaskType, string, string) (bool, error) UnqueueTask(context.Context, schemas.TaskType, string) error CurrentlyQueuedTasksCount(context.Context) (uint64, error) ExecutedTasksCount(context.Context) (uint64, error) }
Store ..