octant

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFactory

type HandlerFactory struct {
	// contains filtered or unexported fields
}

HandlerFactory is a factory that generate's Octant's HTTP handler. Octant has a frontend and backend handler and they will both be populated in the generated handler.

func NewHandlerFactory

func NewHandlerFactory(optionList ...Option) *HandlerFactory

NewHandlerFactory creates an instance of HandlerFactory.

func (*HandlerFactory) Handler

func (hf *HandlerFactory) Handler(ctx context.Context) (http.Handler, error)

Handler returns an HTTP handler.

func (*HandlerFactory) SetFrontend added in v0.13.0

func (hf *HandlerFactory) SetFrontend(fn HandlerFactoryFunc)

type HandlerFactoryFunc added in v0.13.0

type HandlerFactoryFunc func(ctx context.Context) (http.Handler, error)

type Option

type Option func(o *options)

Option is a functional option for configuring Octant.

func BackendHandler

func BackendHandler(fn func(ctx context.Context) (http.Handler, error)) Option

BackendHandler sets the handler for Octant's backend.

func FrontendURL

func FrontendURL(proxyURL string) Option

FrontendURL configures Octant to use a proxy for rendering its frontend.

type ProxiedFrontendHandler

type ProxiedFrontendHandler struct {
	// contains filtered or unexported fields
}

ProxiedFrontendHandler creates an HTTP handler that proxies to a target URL.

func NewProxiedFrontend

func NewProxiedFrontend(ctx context.Context, targetURL string) (*ProxiedFrontendHandler, error)

NewProxiedFrontend creates an instance of ProxiedFrontendHandler. It will return an error if the proxy can not be created.

func (ProxiedFrontendHandler) ServeHTTP

ServeHTTP allows ProxiedFrontendHandler to satisfy the http.Handler interface.

Jump to

Keyboard shortcuts

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