Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // RunRef if this event is in the scope of a specific run // if nil then is a general event that could be routed to triggers RunRef RunRef // SourceNode is the Ref of the node in the context of a RunRef SourceNode config.NodeRef // Tag is the label that helps route the event. // it will match node.Type for trigger nodes, and node.Listen for task and merge nodes. Tag string // Good specifically when this is classed as a good event Good bool // Unique and ordered event ID within a Run. An ID greater than another // ID must have happened after it within the context of the RunRef. // A flow initiating trigger will have ID 1. ID int64 // Opts - some optional data in the event Opts nt.Opts }
Event defines a moment in time thing occurring
type HostedIDRef ¶
HostedIDRef is any ID unique within the scope of the host that created it.
func (HostedIDRef) Equal ¶
func (h HostedIDRef) Equal(g HostedIDRef) bool
Equal returns true if h and g are considered equal
func (HostedIDRef) Equals ¶
func (h HostedIDRef) Equals(rh HostedIDRef) bool
Equals compares receiver with param rh
func (HostedIDRef) String ¶
func (h HostedIDRef) String() string
type Observer ¶
type Observer interface {
Notify(e Event)
}
Observer defines the interface for observers.
type Queue ¶
Queue is not strictly a queue, it just distributes all events to the observers
type RunRef ¶
type RunRef struct { // FlowRef identifies the flow that this reference relates to FlowRef config.FlowRef // Run identifies the host and id that this run was initiated by. // This is a cluster unique reference, which may not refer to the node that is // executing the Run (that will be defined by ExecHost) Run HostedIDRef // ExecHost is the host that is actually executing, or executed this event, // use in conjunction with Run to find the active and archived run ExecHost string }
RunRef uniquely identifies and routes a particular run across the whole cluster
func (RunRef) Adopted ¶
Adopted means that this RunRef has been added to a pending list and been assigned a unique run ID
Click to show internal directories.
Click to hide internal directories.