Documentation
¶
Overview ¶
Package reqctx provides a context.Context based mechanism to cache data for the duration of a request. A new cache is automatically created for every request handled by the httpserver or every message consumed by the stream package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Delete removes the stored value. It does nothing if the context was not wrapped using New or no value of the given type was stored.
func Get ¶
Get returns the stored value for the current request or nil if no value has yet been stored. Nil is also returned if the context was not wrapped using New. The returned value is located based on the requested type (thus, you can't store multiple values of the same type in one request).
Types ¶
This section is empty.