Documentation ¶
Overview ¶
Example (Handler) ¶
cb := func(ctx context.Context, sub string, data []byte) ([]byte, error) { return nil, nil } tele := tel.NewNull() mw := New(tele, false) conn, _ := nats.Connect("example.com") _, _ = conn.QueueSubscribe("sub", "queue", mw.Handler(cb)) _, _ = conn.QueueSubscribe("sub2", "queue", mw.Handler(cb))
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MiddleWare ¶
type MiddleWare struct {
// contains filtered or unexported fields
}
MiddleWare helper
func (*MiddleWare) Handler ¶
func (n *MiddleWare) Handler(next PostFn) func(*nats.Msg)
Handler is entry point perform recovery, debug logging and perform tracing
Click to show internal directories.
Click to hide internal directories.