Documentation ¶
Index ¶
- func StartProfilingServer(ctx context.Context, pprofPort int) error
- func StartProfilingServerWithDefaultHandlers(ctx context.Context, pprofPort int, handlers map[string]http.Handler) error
- func WriteJSONResponse(resp http.ResponseWriter, code int, body interface{}) error
- func WriteStringResponse(resp http.ResponseWriter, code int, body string) error
- type BuildVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartProfilingServer ¶
Starts an http server on the given port
func StartProfilingServerWithDefaultHandlers ¶
func StartProfilingServerWithDefaultHandlers(ctx context.Context, pprofPort int, handlers map[string]http.Handler) error
Forwards the call to StartProfilingServer Also registers: 1. the prometheus HTTP handler on '/metrics' path shared with the profiling server. 2. A healthcheck (L7) handler on '/healthcheck'. 3. A version handler on '/version' provides information about the specific build. 4. A config handler on '/config' provides a dump of the currently loaded config.
func WriteJSONResponse ¶
func WriteJSONResponse(resp http.ResponseWriter, code int, body interface{}) error
Writes a JSON to the http output stream
func WriteStringResponse ¶
func WriteStringResponse(resp http.ResponseWriter, code int, body string) error
Writes a string to the Http output stream
Types ¶
type BuildVersion ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.