github.com/koko1123/flow-go-1@v0.29.6/module/metrics/unstaked/engine.go (about) 1 package unstaked 2 3 import ( 4 "github.com/koko1123/flow-go-1/module" 5 ) 6 7 type EngineCollector struct { 8 metrics module.EngineMetrics 9 } 10 11 func NewUnstakedEngineCollector(metrics module.EngineMetrics) *EngineCollector { 12 return &EngineCollector{metrics} 13 } 14 15 func (ec *EngineCollector) MessageSent(engine string, message string) { 16 ec.metrics.MessageSent("unstaked_"+engine, message) 17 } 18 19 func (ec *EngineCollector) MessageReceived(engine string, message string) { 20 ec.metrics.MessageReceived("unstaked_"+engine, message) 21 } 22 23 func (ec *EngineCollector) MessageHandled(engine string, message string) { 24 ec.metrics.MessageHandled("unstaked_"+engine, message) 25 }