Skip to content

Commit

Permalink
add receivers to allow access to a Status' complete and complete-sink…
Browse files Browse the repository at this point in the history
… IDs
  • Loading branch information
Peter Wilson committed Oct 27, 2023
1 parent 802587e commit 0aaa4e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ type Status struct {
Warnings []error
}

// Complete returns the IDs of 'filter' and 'sink' type nodes that successfully processed the Event.
func (s Status) Complete() []NodeID {
return s.complete
}

// CompleteSinks returns the IDs of 'sink' type nodes that successfully processed the Event.
func (s Status) CompleteSinks() []NodeID {
return s.completeSinks
}

func (s Status) getError(threshold, thresholdSinks int) error {
switch {
case len(s.complete) < threshold:
Expand Down

0 comments on commit 0aaa4e7

Please sign in to comment.