Documentation
¶
Overview ¶
Package cookie implements a specialized version of a context - It is cancellable - It has a channel associated with it to reply to state callbacks - It can be marshalled by having a cgo Handle attached to it
Index ¶
Constants ¶
const CONTEXTK contextt = 0
CONTEXTK is the key of the cookie
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
Cookie is the cookie which is just a context with some other data associated with it We could potentially only uses contexts with values, but this is nicer for type checking
func NewWithContext ¶
NewWithContext creates a new cookie with a context It stores the cancel and channel inside of the struct
func (*Cookie) Cancel ¶
Cancel cancels the cookie by calling the context cancel function It returns an error if no such function exists
func (*Cookie) MarshalJSON ¶
MarshalJSON marshals the cookie to JSON