Documentation
¶
Overview ¶
Package services contains the logic for templating and serving checks to agents. Using the specifications from the config, this package creates a queue containing all services for all boxes for all teams. This queue is then randomized, then served using a lock-free atomic counter for concurrent access. Users are randomly pulled from the database when needed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNext ¶
func GetNext(ctx context.Context, cfg *config.APIConfigSpec, db *pgxpool.Pool) (types.Service, error)
GetNext returns the next service in the queue. This is a fully templated service, with check info, team number, and a username/password.
func InitServices ¶
func InitServices(cfg *config.APIConfigSpec) error
InitServices reads the config and generates a list containing every service for every team.
func IsPaused ¶
func IsPaused() bool
IsPaused quickly checks if quincy is paused. True means paused, false means unpaused.
func Pause ¶
func Pause() (changed bool)
Pause pauses quincy, updating the time it entered this state only if the state changes.
func PauseStatus ¶ added in v0.0.55
PauseStatus returns the competition pause status as well as the time it entered that state.
Types ¶
This section is empty.