Documentation ¶
Overview ¶
Package event provides some primitives that are used for message passing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Kind Kind Resp Resp // channel to send an ack response on, nil to skip //Wg *sync.WaitGroup // receiver barrier to Wait() for everyone else on Err error // store an error in our event }
Event is the main struct that stores event information and responses.
func (*Event) ACK ¶
func (event *Event) ACK()
ACK sends a single acknowledgement on the channel if one was requested.
type Resp ¶
type Resp chan error
Resp is a channel to be used for boolean responses. A nil represents an ACK, and a non-nil represents a NACK (false). This also lets us use custom errors.
func NewResp ¶
func NewResp() Resp
NewResp is just a helper to return the right type of response channel.
Click to show internal directories.
Click to hide internal directories.