github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/collection/events/distributor.go (about) 1 package events 2 3 import ( 4 "github.com/onflow/flow-go/engine/collection" 5 ) 6 7 // CollectionEngineEventsDistributor set of structs that implement all collection engine event interfaces. 8 type CollectionEngineEventsDistributor struct { 9 *ClusterEventsDistributor 10 } 11 12 var _ collection.EngineEvents = (*CollectionEngineEventsDistributor)(nil) 13 14 // NewDistributor returns a new *CollectionEngineEventsDistributor. 15 func NewDistributor() *CollectionEngineEventsDistributor { 16 return &CollectionEngineEventsDistributor{ 17 ClusterEventsDistributor: NewClusterEventsDistributor(), 18 } 19 } 20 21 func (d *CollectionEngineEventsDistributor) AddConsumer(consumer collection.EngineEvents) { 22 d.ClusterEventsDistributor.AddConsumer(consumer) 23 }