Documentation ¶
Index ¶
Constants ¶
View Source
const (
AOHTTPHeader = "x-trace"
)
Variables ¶
This section is empty.
Functions ¶
func HandlerWithWrapper ¶
func HandlerWithWrapper(handlerFunc interface{}, w Wrapper) interface{}
HandlerWithWrapper wraps a function with the wrapper and returns the wrapped function.
Types ¶
type Wrapper ¶
type Wrapper interface { // Before is called before the real handler is called. Before(context.Context, json.RawMessage, ...interface{}) context.Context // After is called after the real handler is called. After(interface{}, *typedError, ...interface{}) interface{} }
Wrapper offers the ability to be called before and after a handler is executed.
Click to show internal directories.
Click to hide internal directories.