Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExampleHTTPEndpoint ¶
NewExampleHTTPEndpoint creates a new HTTP handler
Types ¶
type ApiServer ¶
type ApiServer interface { // Launch initializes and launches the server Launch() error // AwaitShutdown blocks until the server is shut down AwaitShutdown() error // Address returns the address the server is listening on Address() net.Addr // MetricsAddress returns the address the metrics server is listening on MetricsAddress() net.Addr // Shutdown appoints a server shutdown and blocks until the server // is gracefully stopped Shutdown() error }
ApiServer defines the API server interface
type ExampleHTTPEndpoint ¶
type ExampleHTTPEndpoint struct {
// contains filtered or unexported fields
}
ExampleHTTPEndpoint represents an HTTP handler example used alongside the webwire endpoint
func (*ExampleHTTPEndpoint) ServeHTTP ¶
func (hand *ExampleHTTPEndpoint) ServeHTTP( resp http.ResponseWriter, req *http.Request, )
ServeHTTP implements the http.Handler interface
type MetricsHandler ¶
type MetricsHandler struct{}
MetricsHandler represents the handler used for handling metric requests
func NewMetricsHandler ¶
func NewMetricsHandler() *MetricsHandler
NewMetricsHandler creates a new metrics handler instance
func (*MetricsHandler) ServeHTTP ¶
func (handler *MetricsHandler) ServeHTTP( w http.ResponseWriter, r *http.Request, )
ServeHTTP handles incoming metrics export requests
Source Files ¶
Click to show internal directories.
Click to hide internal directories.