Documentation ¶
Overview ¶
Package health provides and easy way of checking dependencies for your aah application
Index ¶
Constants ¶
const Version = "0.1.0"
Version number of library.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector contains the health reporters to check and its responded data for the JSON response.
func NewCollector ¶
NewCollector method returns a `Collector` instance. It periodically checks all its registered reporters.
func (*Collector) AddReporter ¶
AddReporter method adds a dependency to health check reporter that will be called per interval to get health report.
func (*Collector) Register ¶
func (c *Collector) Register(app *aah.Application, basePath ...string) error
Register method registers the health collector into aah application with two routes `/healthcheck` and `/ping`.
Provides optional base path or route prefix for the above routes.
func (*Collector) RegisterForDomain ¶
func (c *Collector) RegisterForDomain(app *aah.Application, domainName string, basePath ...string) error
RegisterForDomain method registers the health collector into aah application with two routes `/healthcheck` and `/ping` for given domain hostname.
Provides optional base path or route prefix for the above routes.