Documentation
¶
Index ¶
- func Run(router *Router, transports ...Transport)
- type Client
- type ContextProvider
- type ContextWith
- type EmptyOperator
- type Metadata
- type MetadataCarrier
- type MiddleOperators
- type Operator
- type OperatorFactory
- type OperatorInit
- type OperatorNewer
- type OperatorWithParams
- type OperatorWithoutOutput
- type Result
- type Route
- type Router
- type Routes
- type Transport
- type WithMiddleOperators
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
Do(ctx context.Context, req interface{}, metas ...Metadata) Result
}
type ContextProvider ¶
type ContextProvider interface {
Operator
ContextKey() interface{}
}
type ContextWith ¶
type ContextWith = func(ctx context.Context) context.Context
func ComposeContextWith ¶
func ComposeContextWith(withs ...ContextWith) ContextWith
type EmptyOperator ¶
type EmptyOperator struct {
OperatorWithoutOutput
}
type Metadata ¶
type Metadata map[string][]string
Example ¶
Output:
a=Av1&a=Av2&b=Bv1
true
Av1
a=Av1&a=Av2
type MetadataCarrier ¶
type MetadataCarrier interface {
Meta() Metadata
}
type MiddleOperators ¶
type MiddleOperators []Operator
type OperatorFactory ¶
type OperatorFactory struct {
Type reflect.Type
ContextKey interface{}
NoOutput bool
Params url.Values
IsLast bool
Operator Operator
}
func NewOperatorFactory ¶
func NewOperatorFactory(op Operator, last bool) *OperatorFactory
type OperatorInit ¶
type OperatorInit interface {
InitFrom(o Operator)
}
type OperatorNewer ¶
type OperatorNewer interface {
New() Operator
}
type OperatorWithParams ¶
type OperatorWithParams interface {
OperatorParams() map[string][]string
}
type OperatorWithoutOutput ¶
type OperatorWithoutOutput interface {
Operator
NoOutput()
}
type Route ¶
type Route struct {
Operators []Operator
// contains filtered or unexported fields
}
func (*Route) OperatorFactories ¶
func (rs *Route) OperatorFactories() (factories []*OperatorFactory)
type WithMiddleOperators ¶
type WithMiddleOperators interface {
MiddleOperators() MiddleOperators
}
Click to show internal directories.
Click to hide internal directories.