docs/service-discovery/health-checks.md
This section is still a work in progress.
agent/checks contains the logic for performing active health checking.
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.
Checks
field on structs.RegisterRequest. The entrypoint is CatalogRegister in
agent/catalog_endpoint.go.AgentRegisterCheck in agent/agent_endpoint.goCheck or Checks fields on ServiceDefinition. The entrypoint is AgentRegisterService
in agent/agent_endpoint.go.Checks and Check fields
on config.Config in agent/config/config.go.Checks and Check fields on ServiceDefinition in agent/config/config.go.ServiceDefinition in [agent/config/builder.go].Checks and Check fields on api.AgentServiceRegistration. The entrypoint is
ServicesFromFiles in command/services/config.go.Transaction API allows for registering a check.