Event Filter

Event Relationships

A filter defines the relationship among the subscribed events. When a thread registers with the broker, Based on the filter type. the events received can be relayed to the subsequent steps right away or will be buffered temporarily.

Disjunction Filter

A conjunction filter only allows any of the subscribed events to pass freely as soon as they are received.

type Disjunctions struct {
	chans    map[string]chan interface{}
	aggrChan chan interface{}
	Actor    Actor
}

Conjunction Filter

A conjunction filter only relays events to subsequent steps when all the subscribed events are received from the broker. There is an internal buffer in the conjunction filter to temporary hold the events, which makes it different from a conjunction filter.

type Conjunctions struct {
	triggers map[string]chan interface{}
	indices  map[string]int
	values   []interface{}
	Actor    Actor
}

Last updated