Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDeadlineBuffer ¶
func WithDeadlineBuffer( parent context.Context, timeout time.Duration, buffer time.Duration, ) (context.Context, context.CancelFunc)
WithDeadlineBuffer creates a child context with desired timeout. If buffer is non-zero, then child context timeout will be the minOf(parentCtx.Deadline()-buffer, maxTimeout). Use this method to create child context when childContext cannot use all of parent's deadline but instead there is a need to leave some time for parent to do some post-work
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.