Documentation ¶
Overview ¶
Package updateallowedcontext stores and accesses the update allowed in context.Context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns the update allowed channel, if any.
func IsUpdateAllowed ¶
IsUpdateAllowed checks whether the given context obtains information about the update allowed channel as defined in this package, if any update allowed channel is present.
NOTE that the update allowed channel, if any found, is only used to be closed to signal updates are allowed. It is not guaranteed that the channel is buffered or read from. Clients must not write to it. Otherwise the update allowed channel will block eventually. It is safe to signal updates are allowed via SetUpdateAllowed.
func NewContext ¶
NewContext returns a new context.Context that carries value v.
func SetUpdateAllowed ¶
SetUpdateAllowed is a safe way to signal updates are allowed.
Types ¶
This section is empty.