Skip to content

Commit

Permalink
Removing redundant types
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Feb 12, 2025
1 parent 320c72a commit a5a93b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 0 additions & 9 deletions commit/metrics/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/smartcontractkit/chainlink-ccip/commit/committypes"
"github.com/smartcontractkit/chainlink-ccip/commit/merkleroot"
"github.com/smartcontractkit/chainlink-ccip/commit/tokenprice"
"github.com/smartcontractkit/chainlink-ccip/internal/plugintypes"
)

Expand Down Expand Up @@ -43,18 +42,10 @@ func (n *Noop) TrackObservation(committypes.Observation) {}

func (n *Noop) TrackOutcome(committypes.Outcome) {}

func (n *Noop) TrackMerkleObservation(merkleroot.Observation, string) {}

func (n *Noop) TrackMerkleOutcome(merkleroot.Outcome, string) {}

func (n *Noop) TrackRmnReport(float64, bool) {}

func (n *Noop) TrackRmnRequest(string, float64, uint64, string) {}

func (n *Noop) TrackTokenPricesObservation(tokenprice.Observation) {}

func (n *Noop) TrackTokenPricesOutcome(tokenprice.Outcome) {}

func (n *Noop) TrackProcessorLatency(string, string, time.Duration, error) {}

func (n *Noop) TrackProcessorObservation(string, plugintypes.Trackable) {}
Expand Down
4 changes: 4 additions & 0 deletions internal/plugintypes/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func NewUSD18(value int64) USD18 {
return big.NewInt(value)
}

// Trackable is an interface for types that can be tracked using Prometheus metrics.
// That way we are moving responsibility of presenting proper stats and metrics to
// the underlying types. It's meant to be implemented by Observation and Outcome in
// the Commit Plugin's processors.
type Trackable interface {
Stats() map[string]int
}

0 comments on commit a5a93b8

Please sign in to comment.