github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/collection/events.go (about) 1 package collection 2 3 import "github.com/onflow/flow-go/model/flow" 4 5 // EngineEvents set of methods used to distribute and consume events related to collection node engine components. 6 type EngineEvents interface { 7 ClusterEvents 8 } 9 10 // ClusterEvents defines methods used to disseminate cluster ID update events. 11 // Cluster IDs are updated when a new set of epoch components start and the old set of epoch components stops. 12 // A new list of cluster IDs will be assigned when the new set of epoch components are started, and the old set of cluster 13 // IDs are removed when the current set of epoch components are stopped. The implementation must be concurrency safe and non-blocking. 14 type ClusterEvents interface { 15 // ActiveClustersChanged is called when a new cluster ID update event is distributed. 16 // Any error encountered on consuming event must handle internally by the implementation. 17 // The implementation must be concurrency safe, but can be blocking. 18 ActiveClustersChanged(flow.ChainIDList) 19 }