Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFrontendHandler ¶ added in v0.18.0
func SetFrontendHandler ¶ added in v0.18.0
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) SetFrontend ¶ added in v0.13.0
func (hf *HandlerFactory) SetFrontend(fn HandlerFactoryFunc)
type HandlerFactoryFunc ¶ added in v0.13.0
type Option ¶
type Option func(o *options)
Option is a functional option for configuring Octant.
func BackendHandler ¶
BackendHandler sets the handler for Octant's backend.
func FrontendURL ¶
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 ¶
func (p ProxiedFrontendHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP allows ProxiedFrontendHandler to satisfy the http.Handler interface.