Documentation
¶
Overview ¶
The event package implements WolfMUD's asynchronous scripting mechanism.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Script is an indirect reference to the cmd.Script function. The cmd package cannot be imported directly as it causes a cyclic dependency. However the cmd package can import the event package to initialise this variable which we can then use. See cmd.Init in cmd/state.go for initialization.
Functions ¶
This section is empty.
Types ¶
type Cancel ¶
type Cancel chan<- struct{}
Cancel is a send only channel that can be used to cancel a queued event. When an event is queued via Queue a Cancel channel will be returned. The Cancel channel should be closed to cancel the pending event that was queued.
func Queue ¶
Queue schedules a scripted event to happen after the given delay period. The command specified in the input will run wih access to scripting only commands starting with a '$' symbol. The event can be cancelled by closing the returned Cancel channel.
Source Files
¶
- event.go