externalapi

package
v0.0.0-...-031e5ed Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventsHandler

func NewEventsHandler(config *mesh.Configuration, maxRequestSize int64) http.Handler

NewEventsHandler creates an http.Handler to handle the events endpoint

func NewHandler

func NewHandler(config *mesh.Configuration, maxRequestSize int64, eventsClient subscribed.EventsClient, eventMeshURL string) http.Handler

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

func NewHealthCheckHandler

func NewHealthCheckHandler() http.Handler

NewHealthCheckHandler creates handler for performing health check

func NewPermanentRedirectionHandler

func NewPermanentRedirectionHandler(redirectLocation string) http.Handler

NewPermanentRedirectionHandler creates an http.Handler to handle the /v2/events legacy endpoint

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)

type SubscribedEventsHandler

type SubscribedEventsHandler interface {
	GetSubscribedEvents(w http.ResponseWriter, r *http.Request)
}

SubscribedEventsHandler is an interface representing handler for the /v1/subscribedevents endpoint

func NewActiveEventsHandler

func NewActiveEventsHandler(eventsClient subscribed.EventsClient) SubscribedEventsHandler

NewActiveEventsHandler creates handler to handle subscribedevents endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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