package
0.4.0
Repository: https://github.com/maxatome/cds.git
Documentation: pkg.go.dev

# Functions

CreateBuiltinActions add builtin actions in database if needed.
CreateBuiltinEnvironments creates default environment if needed.
DeleteWorker remove worker from database.
DeleteWorkerModel removes from database worker model informations and all its capabilities.
DeleteWorkerModelCapability removes a capability from existing worker model.
EstimateWorkerModelNeeds returns for each worker model the needs of instances.
FindBuildingWorker retrieves in database the worker building given actionBuildID.
GenerateToken generate a random 64bytes hexadecimal string.
GetModelCapabilities load model capabilities from cache.
Heartbeat runs in a goroutine and check last beat from all workers on a 10s basis.
InsertToken inserts a new token in database.
InsertWorker inserts worker representation into database.
InsertWorkerModel insert a new worker model in database.
LoadAllActionCount counts all waiting actions.
LoadDeadWorkers load worker with refresh last beat > timeout.
LoadGroupActionCount counts waiting action for group.
LoadSharedWorkerModels returns worker models with group shared.infra.
LoadToken fetch token infos from database.
LoadWorker retrieves worker in database.
LoadWorkerModelByID retrieves a specific worker model in database.
LoadWorkerModelByName retrieves a specific worker model in database.
LoadWorkerModelCapabilities retrieves capabilities of given worker model.
LoadWorkerModels retrieves models from database.
LoadWorkerModelsByGroup returns worker models for a group.
LoadWorkerModelsByUser returns worker models list according to user's groups.
LoadWorkerModelStatusForAdminUser lods worker model status for group.
LoadWorkerModelStatusForGroup lods worker model status for group.
LoadWorkerModelsUsableOnGroup returns worker models for a group.
LoadWorkers load all workers in db.
LoadWorkersByModel load workers by model.
ModelCapabilititiesCacheLoader set all model Capabilities in the cache.
RefreshWorker Update worker last_beat.
RegisterWorker Register new worker.
SetStatus sets action_build_id and status to building on given worker.
SetToBuilding sets action_build_id and status to building on given worker.
UpdateWorkerModel update a worker model.
UpdateWorkerModelCapability update a worker model capability.
UpdateWorkerStatus changes worker status to Disabled.

# Variables

ErrNoWorker means the given worker ID is not found.
WorkerHeartbeatTimeout defines the number of seconds allowed for workers to refresh their beat.

# Structs

ActionBuildInfo is returned to worker in answer to takeActionBuildHandler.
ActionCount represents a count of action.
RegistrationForm represents the arguments needed to register a worker.
Token describes tokens used by worker to access the API on behalf of a group.

# Type aliases

ActionCountFunc ...
ModelStatusFunc ...