0fad917f13
Credit to Freddy for finding this a while ago.
2.1 KiB
2.1 KiB
Health Checks
This section is still a work in progress.
agent/checks contains the logic for performing active health checking.
Check Registration flows
There are many paths to register a check. Many of these use different struct types, so to properly validate and convert a check, all of these paths must be reviewed and tested.
- API /v1/catalog/register - the
Checks
field onstructs.RegisterRequest
. The entrypoint isCatalogRegister
in agent/catalog_endpoint.go. - API /v1/agent/check/register - the entrypoint
is
AgentRegisterCheck
in agent/agent_endpoint.go - API /v1/agent/service/register -
the
Check
orChecks
fields onServiceDefinition
. The entrypoint isAgentRegisterService
in agent/agent_endpoint.go. - Config Checks - the
Checks
andCheck
fields onconfig.Config
in agent/config/config.go. - Config Service.Checks - the
Checks
andCheck
fields onServiceDefinition
in agent/config/config.go. - CLI consul services register - the
Checks
andCheck
fields onapi.AgentServiceRegistration
. The entrypoint isServicesFromFiles
in command/services/config.go. - API /v1/txn - the
Transaction
API allows for registering a check.