Documentation ¶
Overview ¶
Package mergectx provides a utility for merging two context.Context objects, creating a child context that contains the union of both context's values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Join ¶
Join returns a new context which is the child of two parents. It behaves analogously to ctx.Join.Deadline
Done() channel is closed when both parent contexts are done.
Deadline() returns the latest deadline of the two parent contexts.
Err() returns the first error it finds. Note that this is not reliable.
Value(key) looks for key in parent contexts. First found is returned.
func Link ¶
Link returns new context which is the child of child of two parents. It is analogous to ctx.Link
Done() channel is closed when one of parents contexts is done.
Deadline() returns earliest deadline between parent contexts.
Err() returns error from first done parent context.
Value(key) looks for key in parent contexts. First found is returned.
Types ¶
This section is empty.