Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPreserveExpiredValues ¶
GetPreserveExpiredValues looks up, and returns the PreserveExpressValues value in the context. Returning true if enabled, false otherwise.
func WithPreserveExpiredValues ¶
WithPreserveExpiredValues adds a Value to the Context if expired values should be preserved, and looked up by a Context wrapped by WithSuppressCancel.
WithPreserveExpiredValues must be added as a value to a Context, before that Context is wrapped by WithSuppressCancel
func WithSuppressCancel ¶
WithSuppressCancel wraps the Context value, suppressing its deadline and cancellation events being propagated downstream to consumer of the returned context.
By default the wrapped Context's Values are available downstream until the wrapped Context is canceled. Once the wrapped Context is canceled, Values method called on the context return will no longer lookup any key. As they are now considered expired.
To override this behavior, use WithPreserveExpiredValues on the Context before it is wrapped by WithSuppressCancel. This will make the Context returned by WithSuppressCancel allow lookup of expired values.
Types ¶
This section is empty.