Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents the context of an event. Handlers of an event may call methods on the context to change the result of the event.
func (*Context) After ¶
After calls the function passed after the action of the event has been completed, either by a call to (*Context).Continue() or (*Context).Stop(). After can be executed multiple times to attach more functions to be called after the event is executed.
func (*Context) Continue ¶
func (ctx *Context) Continue(f func())
Continue calls the function f if the context is not cancelled. If it is cancelled, Continue will return immediately. These functions are not generally useful for handling events. See After() for executing code after the event happens.
func (*Context) Stop ¶
func (ctx *Context) Stop(f func())
Stop calls the function f if the context is cancelled. If it is not cancelled, Stop will return immediately. Stop does the opposite of Continue. These functions are not generally useful for handling events. See After() for executing code after the event happens.