package fromda
type Metrics interface {
RecordDBDerivedEntryCount(count int64)
}
type ChainMetrics interface {
RecordDBEntryCount(kind string, count int64)
}
type delegate struct {
inner ChainMetrics
kind string
}
func (d *delegate) RecordDBDerivedEntryCount(count int64) {
d.inner.RecordDBEntryCount(d.kind, count)
}
func AdaptMetrics(chainMetrics ChainMetrics, kind string) Metrics {
return &delegate{
kind: kind,
inner: chainMetrics,
}
}
-
Axel Kingsley authored
* Initialize using Dependency Set Configuration * op-supervisor: init fromda, route fromda metrics, handle cross-unsafe, improve backend resource initialization * op-supervisor: attach RPC, create processors upfront, implement backend test * op-supervisor: fix dependency set configuration and test setup * Update op-supervisor/supervisor/backend/backend.go Co-authored-by:
Axel Kingsley <axel.kingsley@gmail.com> --------- Co-authored-by:
protolambda <proto@protolambda.com>
c26ab41e