Documentation
¶
Overview ¶
Package api hosts the HTTP control-plane for watchtower (token auth, /v1/update, /v1/metrics).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Token string
// contains filtered or unexported fields
}
API is the http server responsible for serving the HTTP API endpoints
func (*API) RegisterFunc ¶
func (api *API) RegisterFunc(path string, fn http.HandlerFunc)
RegisterFunc is a wrapper around http.HandleFunc that also sets the flag used to determine whether to launch the API
func (*API) RegisterHandler ¶
RegisterHandler is a wrapper around http.Handler that also sets the flag used to determine whether to launch the API
func (*API) RequireToken ¶
func (api *API) RequireToken(fn http.HandlerFunc) http.HandlerFunc
RequireToken is wrapper around http.HandleFunc that checks token validity
Directories
¶
| Path | Synopsis |
|---|---|
|
Package metrics exposes the Prometheus /v1/metrics HTTP handler.
|
Package metrics exposes the Prometheus /v1/metrics HTTP handler. |
|
Package update exposes the HTTP handler for the /v1/update API endpoint.
|
Package update exposes the HTTP handler for the /v1/update API endpoint. |
Click to show internal directories.
Click to hide internal directories.