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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.