Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterChannel ¶
type AfterChannel struct {
Handlers []AfterHandlerTempl
}
AfterChannel contains the functions to be called after the handler method is executed
func (*AfterChannel) Clear ¶
func (p *AfterChannel) Clear()
Clear should not be used after pitaya is running
func (*AfterChannel) ExecuteAfterPipeline ¶
func (p *AfterChannel) ExecuteAfterPipeline(ctx context.Context, res interface{}, err error) (interface{}, error)
ExecuteAfterPipeline calls registered handlers
func (*AfterChannel) PushBack ¶
func (p *AfterChannel) PushBack(h AfterHandlerTempl)
PushBack should not be used after pitaya is running
func (*AfterChannel) PushFront ¶
func (p *AfterChannel) PushFront(h AfterHandlerTempl)
PushFront should not be used after pitaya is running
type AfterHandlerTempl ¶
AfterHandlerTempl is a function for the after handler, receives both the handler response and the error returned
type Channel ¶
type Channel struct {
Handlers []HandlerTempl
}
Channel contains the functions to be called before the handler method is executed
func (*Channel) ExecuteBeforePipeline ¶
func (p *Channel) ExecuteBeforePipeline(ctx context.Context, data interface{}) (context.Context, interface{}, error)
ExecuteBeforePipeline calls registered handlers
func (*Channel) PushBack ¶
func (p *Channel) PushBack(h HandlerTempl)
PushBack should not be used after pitaya is running
func (*Channel) PushFront ¶
func (p *Channel) PushFront(h HandlerTempl)
PushFront should not be used after pitaya is running
type HandlerHooks ¶
type HandlerHooks struct {
Hooks
}
type HandlerTempl ¶
type HandlerTempl func(ctx context.Context, in interface{}) (c context.Context, out interface{}, err error)
HandlerTempl is a function that has the same signature as a handler and will be called before or after handler methods
type Hooks ¶
type Hooks struct { BeforeHandler *Channel AfterHandler *AfterChannel }
Hooks contains before and after channels
type RemoteHooks ¶
type RemoteHooks struct {
Hooks
}