Documentation ¶
Index ¶
- type FrontRouter
- func (fr *FrontRouter) Add(prefix string, handler routerHandler)
- func (fr *FrontRouter) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (fr *FrontRouter) SetFallbackHandlers(handlers []OptionalHandler)
- func (fr *FrontRouter) SetFinalFallbackHandler(handler http.Handler)
- func (fr *FrontRouter) SetPrimaryHandlers(handlers []OptionalHandler)
- type Module
- func (m *Module) Configure(injector *dingo.Injector)
- func (*Module) CueConfig() string
- func (*Module) FlamingoLegacyConfigAlias() map[string]string
- func (m *Module) Inject(eventRouter flamingo.EventRouter, logger flamingo.Logger, config ...)
- func (m *Module) Notify(ctx context.Context, event flamingo.Event)
- type OptionalHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrontRouter ¶
type FrontRouter struct {
// contains filtered or unexported fields
}
FrontRouter is a http.handler which serves multiple sites based on the host/path prefix
func (*FrontRouter) Add ¶
func (fr *FrontRouter) Add(prefix string, handler routerHandler)
Add appends new Handler to Frontrouter
func (*FrontRouter) ServeHTTP ¶
func (fr *FrontRouter) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP gets Router for Request and lets it handle it
func (*FrontRouter) SetFallbackHandlers ¶
func (fr *FrontRouter) SetFallbackHandlers(handlers []OptionalHandler)
SetFallbackHandlers sets list of optional fallback Handlers
func (*FrontRouter) SetFinalFallbackHandler ¶
func (fr *FrontRouter) SetFinalFallbackHandler(handler http.Handler)
SetFinalFallbackHandler sets Fallback for undefined Handler
func (*FrontRouter) SetPrimaryHandlers ¶
func (fr *FrontRouter) SetPrimaryHandlers(handlers []OptionalHandler)
SetPrimaryHandlers sets list of optional fallback Handlers
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module for core/prefix_router
func (*Module) FlamingoLegacyConfigAlias ¶ added in v3.1.2
FlamingoLegacyConfigAlias legacy mapping
func (*Module) Inject ¶
func (m *Module) Inject( eventRouter flamingo.EventRouter, logger flamingo.Logger, config *struct { EnableRootRedirectHandler bool `inject:"config:flamingo.prefixrouter.rootRedirectHandler.enabled,optional"` PublicEndpoint bool `inject:"config:flamingo.opencensus.publicEndpoint,optional"` }, )
Inject dependencies
type OptionalHandler ¶
type OptionalHandler interface {
TryServeHTTP(rw http.ResponseWriter, req *http.Request) (proceed bool, err error)
}
OptionalHandler tries to handle a request
Click to show internal directories.
Click to hide internal directories.