Skip to content

Commit

Permalink
cleaning up job.ServiceCtx --> service.Service unimpls
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Jul 11, 2024
1 parent 7a710de commit 8089246
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
14 changes: 6 additions & 8 deletions core/services/ocr2/plugins/ccip/ccipexec/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ type ExecutionReportingPluginFactory struct {
destPriceRegReader ccipdata.PriceRegistryReader
destPriceRegAddr cciptypes.Address
readersMu *sync.Mutex

services []services.Service
lggr logger.Logger
services []services.Service
}

func (rf *ExecutionReportingPluginFactory) Name() string {
//TODO implement me
panic("implement me")
return rf.lggr.Name()
}

// Start is used to run chainHealthcheck and tokenDataWorker, which were previously passed
Expand Down Expand Up @@ -65,13 +64,11 @@ func (rf *ExecutionReportingPluginFactory) Close() (err error) {
}

func (rf *ExecutionReportingPluginFactory) Ready() error {
//TODO implement me
panic("implement me")
return nil
}

func (rf *ExecutionReportingPluginFactory) HealthReport() map[string]error {
//TODO implement me
panic("implement me")
return make(map[string]error)
}

func NewExecutionReportingPluginFactoryV2(ctx context.Context, lggr logger.Logger, sourceTokenAddress string, srcChainID int64, dstChainID int64, srcProvider commontypes.CCIPExecProvider, dstProvider commontypes.CCIPExecProvider) (*ExecutionReportingPluginFactory, error) {
Expand Down Expand Up @@ -183,6 +180,7 @@ func NewExecutionReportingPluginFactoryV2(ctx context.Context, lggr logger.Logge
},
services: []services.Service{chainHealthcheck, tokenBackgroundWorker},
readersMu: &sync.Mutex{},
lggr: logger.Sugared(lggr),

// the fields below are initially empty and populated on demand
destPriceRegReader: nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ type chainHealthcheck struct {
}

func (c *chainHealthcheck) HealthReport() map[string]error {
//TODO implement me
panic("implement me")
return make(map[string]error)
}

func (c *chainHealthcheck) Name() string {
//TODO implement me
panic("implement me")
return c.lggr.Name()
}

func NewChainHealthcheck(lggr logger.Logger, onRamp ccipdata.OnRampReader, commitStore ccipdata.CommitStoreReader) *chainHealthcheck {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cache

import (
"context"
"fmt"
"strconv"

"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -38,7 +39,7 @@ func (o *ObservedChainHealthcheck) HealthReport() map[string]error {
}

func (o *ObservedChainHealthcheck) Name() string {
return "ObservedChainHealthcheck"
return fmt.Sprintf("ObservedChainHealthcheck.%v.%v.%v", o.plugin, o.sourceChain, o.destChain)
}

func NewObservedChainHealthCheck(
Expand Down
6 changes: 2 additions & 4 deletions core/services/ocr2/plugins/ccip/tokendata/bgworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ type BackgroundWorker struct {
}

func (w *BackgroundWorker) HealthReport() map[string]error {
//TODO implement me
panic("implement me")
return make(map[string]error)
}

func (w *BackgroundWorker) Name() string {
//TODO implement me
panic("implement me")
return "TokenDataBackgroundWorker"
}

func NewBackgroundWorker(
Expand Down

0 comments on commit 8089246

Please sign in to comment.