Documentation ¶
Overview ¶
Package context wraps built-in type context.Context. It serves a place to store/retrieve runtime data and expose utilitarian functions.
Index ¶
- func Err(fn api.ErrorFunc, err api.StreamError)
- func GetErrFunc(ctx context.Context) api.ErrorFunc
- func GetLogFunc(ctx context.Context) func(interface{})
- func HandleErr(ctx context.Context, err error) error
- func Log(ctx context.Context, message interface{}) error
- func WithErrorFunc(ctx context.Context, errFunc api.ErrorFunc) context.Context
- func WithLogFunc(ctx context.Context, logFunc api.LogFunc) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrFunc ¶
GetErrFunc returns the error handling function stored in the context.
func GetLogFunc ¶
GetLogFunc returns the log function stored in the context.
func WithErrorFunc ¶
WithErrorFunc sets the function to handle error from runtime components
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.