Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
Events is pubsub channel for events generated by the engine.
func (*Events) Publish ¶
func (e *Events) Publish(ctx context.Context, action string, eventType types.EventType, actor *types.EventsActor) error
Publish sends an event. The caller will be considered the initial publisher of the event. This means the timestamp will be calculated at this point and this method may read from the calling context.
func (*Events) Subscribe ¶
func (e *Events) Subscribe(ctx context.Context, since, until time.Time, ef *Filter) ([]types.EventsMessage, <-chan *types.EventsMessage, <-chan error)
Subscribe to events on the Events. Events are sent through the returned channel ch. If an error is encountered, it will be sent on channel errs and errs will be closed. To end the subscription, cancel the provided context.
Zero or more filters may be provided as Args. Only events that match *any* of the provided filters will be sent on the channel.
Click to show internal directories.
Click to hide internal directories.