Documentation ¶
Index ¶
Constants ¶
View Source
const ( MediaTypeFormatAndVersion = "application/external.dns.webhook+json;version=1" ContentTypeHeader = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
func StartHTTPApi ¶
func StartHTTPApi(provider provider.Provider, startedChan chan struct{}, readTimeout, writeTimeout time.Duration, providerPort string)
StartHTTPApi starts a HTTP server given any provider. the function takes an optional channel as input which is used to signal that the server has started. The server will listen on port `providerPort`. The server will respond to the following endpoints: - / (GET): initialization, negotiates headers and returns the domain filter - /records (GET): returns the current records - /records (POST): applies the changes - /adjustendpoints (POST): executes the AdjustEndpoints method
Types ¶
type WebhookServer ¶
func (*WebhookServer) AdjustEndpointsHandler ¶
func (p *WebhookServer) AdjustEndpointsHandler(w http.ResponseWriter, req *http.Request)
func (*WebhookServer) NegotiateHandler ¶
func (p *WebhookServer) NegotiateHandler(w http.ResponseWriter, req *http.Request)
func (*WebhookServer) RecordsHandler ¶
func (p *WebhookServer) RecordsHandler(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.