Ctx defines the Context type, which carries deadlines, cancelation futures, and other request-scoped values across API boundaries and between processes.
It is similar to Go's context
package. The main use case is to have incoming requests to a
server create a Context. This Context is propagated in the chain of function calls between the
incoming request until the outging response. On its way, the Context can be replaced with a
derived Context using
A Context carries a deadline, a cancelation Future, and other values across API boundaries.
Returns an empty Context. It is never canceled has neither a value nor a deadline. It is typically used as a top-level Context.
Returns a copy of parent as a new future, which is closed when the returned cancel function is called or when the parent context's future is resolved – whichever happens first.
Returns a copy of the parent context with the given deadline associated to it. The returned context's future resolves when the deadline expires, the returned cancel function is called, or when the parent context's future resolves – whichever happens first.
Returns a copy of parent, but with the given value associated to it.