Documentation ¶
Index ¶
Constants ¶
const ( CtxEventBusKey mwCtxKeyType = iota CtxEventQueueKey )
Keys for components attached to the context for a middleware builder.
Variables ¶
This section is empty.
Functions ¶
func DummyEndpoint ¶
DummyEndpoint is a dummy endpoint.
Types ¶
type Endpoint ¶
Endpoint represent one method for calling from remote.
func DummyMiddleware ¶
DummyMiddleware is a dummy middleware.
type Middleware ¶
Middleware deal with input Endpoint and output Endpoint.
func Build ¶
func Build(mws []Middleware) Middleware
Build builds the given middlewares into one middleware.
func Chain ¶
func Chain(mws ...Middleware) Middleware
Chain connect middlewares into one middleware.
type MiddlewareBuilder ¶
type MiddlewareBuilder func(ctx context.Context) Middleware
MiddlewareBuilder builds a middleware with information from a context.
type RecvEndpoint ¶ added in v0.9.0
RecvEndpoint represent one Recv call
type RecvMiddleware ¶ added in v0.9.0
type RecvMiddleware func(next RecvEndpoint) RecvEndpoint
RecvMiddleware deal with input Endpoint and output Endpoint.
func RecvChain ¶ added in v0.9.0
func RecvChain(mws ...RecvMiddleware) RecvMiddleware
RecvChain connect middlewares into one middleware.
type RecvMiddlewareBuilder ¶ added in v0.9.0
type RecvMiddlewareBuilder func(ctx context.Context) RecvMiddleware
RecvMiddlewareBuilder builds a middleware with information from a context.
type SendEndpoint ¶ added in v0.9.0
SendEndpoint represent one Send call
type SendMiddleware ¶ added in v0.9.0
type SendMiddleware func(next SendEndpoint) SendEndpoint
SendMiddleware deal with input Endpoint and output Endpoint.
func SendChain ¶ added in v0.9.0
func SendChain(mws ...SendMiddleware) SendMiddleware
SendChain connect middlewares into one middleware.
type SendMiddlewareBuilder ¶ added in v0.9.0
type SendMiddlewareBuilder func(ctx context.Context) SendMiddleware
SendMiddlewareBuilder builds a middleware with information from a context.