externalapi

package
v0.0.0-...-1ac4f16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventsHandler

func NewEventsHandler() http.Handler

NewEventsHandler creates an http.Handler to handle the events endpoint

func NewHandler

func NewHandler() http.Handler

NewHandler creates http.Handler(s) for the /v1/events and /v1/health endpoints

func NewHealthCheckHandler

func NewHealthCheckHandler() http.Handler

NewHealthCheckHandler creates handler for performing health check

Types

type ErrorHandler

type ErrorHandler struct {
	Message string
	Code    int
}

An ErrorHandler represents an error with a message and a status code

func NewErrorHandler

func NewErrorHandler(code int, message string) *ErrorHandler

NewErrorHandler creates a new ErrorHandler with the given code and message

func (*ErrorHandler) ServeHTTP

func (eh *ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL