Documentation
¶
Index ¶
Constants ¶
View Source
const (
MetaKeyOrder = "order"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composer ¶ added in v0.8.0
type Composer interface {
http.Handler
adminext.FlowFetcher
}
Composer is an http.Handler that exposes metadata about its FlowComponent chain.
type ContextKey ¶ added in v0.8.0
type ContextKey string
const ( // TargetContextKey used by the forwarder to get the target backend. TargetContextKey ContextKey = "krb.target" // BackendContextKey used to store the backend name. BackendContextKey ContextKey = "krb.backend" )
type CustomHandlerFunc ¶ added in v0.8.0
type CustomHandlerFunc func(FlowComponent, http.ResponseWriter, *http.Request)
type Dummy ¶ added in v0.8.0
type Dummy struct {
CustomHandler CustomHandlerFunc
// Returned by Order() int. Don't import the custom types package here to avoid circular
// imports, so we just use an int and interpret it as the order.
O int
// contains filtered or unexported fields
}
Dummy can be used to replace components with a block that just forwards whatever request it's called to handle. This is useful to be able to easily disable certain components while keeping the structure the same.
func (*Dummy) Next ¶ added in v0.8.0
func (d *Dummy) Next(next FlowComponent)
type FlowComponent ¶ added in v0.8.0
type FlowComponent interface {
http.Handler
Next(FlowComponent)
GetMeta() []adminapi.FlowMeta
}
type FlowMeta ¶ added in v0.8.0
type FlowMeta struct {
// Name is the name of the FlowComponent.
Name string `json:"name"`
// Data holds dynamic key-value pairs associated with this component.
Data map[string]any `json:"data"`
}
FlowMeta holds metadata about a FlowComponent.
type Opts ¶
type Opts struct {
Observability FlowComponent
Router FlowComponent
Custom FlowComponent
Forwarder FlowComponent
}
Click to show internal directories.
Click to hide internal directories.