Documentation ¶
Index ¶
- type Hub
- func (h *Hub) AllClientFindRun(flowID, runID string) *client.Run
- func (h *Hub) AllClientRuns(flowID string) client.RunSummaries
- func (h *Hub) AllHosts() map[string]client.HostConfig
- func (h *Hub) AllRuns(id string) (pending Runs, active Runs, archive Runs)
- func (h *Hub) Config() config.Config
- func (h *Hub) ExecutePending(pend Pend) (bool, error)
- func (h *Hub) FindRun(flowID, runID string) *Run
- func (h *Hub) HostID() string
- func (h *Hub) Notify(e event.Event)
- func (h *Hub) Queue() *event.Queue
- func (h *Hub) Tags() []string
- type Pend
- type Run
- type RunStore
- type Runs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hub ¶
Hub links events to the config rules
func (*Hub) AllClientFindRun ¶
AllClientFindRun queries all hosts for the specified run
func (*Hub) AllClientRuns ¶
func (h *Hub) AllClientRuns(flowID string) client.RunSummaries
AllClientRuns queries all hosts for their summaries for the given run ID
func (*Hub) AllHosts ¶
func (h *Hub) AllHosts() map[string]client.HostConfig
AllHosts returns all the hosts
func (*Hub) ExecutePending ¶
ExecutePending executes a pending on this host if this host has no conflicts. This could have been called directly if this is the only host, or could have been called via the server API as a request for this host to accept the run. The boolean returned represents whether the flow was considered dealt with, meaning an attempt to start executing it occurred.
type Pend ¶
type Pend struct { Ref event.RunRef // unique reference for this run Flow *config.Flow // Flow config as the pend was created TriggeredNode config.NodeRef // which node in the flow that triggered the creation Opts nt.Opts // the options that were relevant when the pend was created }
Pend is a triggered flow that is waiting for a slave
type Run ¶
type Run struct { sync.RWMutex Ref event.RunRef Flow *config.Flow // the config this flow should use ExecHost string // the id of the host who's actually executing this run StartTime time.Time // time the first event triggered EndTime time.Time // time the run ended Ended bool // Ended true if the run has finished Good bool // Good if explicit end node hit with a good event MergeNodes map[string]merge // the states of the merge nodes by node id DataNodes map[string]data // the sates of any data nodes ExecNodes map[string]exec // the sates of any exec nodes }
Run is a specific invocation of a flow