Skip to content

Commit

Permalink
draft commit: service checkable
Browse files Browse the repository at this point in the history
  • Loading branch information
essamhassan committed Feb 15, 2023
1 parent c20b570 commit 38ff4d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/gagliardetto/treeout v0.1.4
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.1
github.com/smartcontractkit/chainlink-relay v0.1.6-0.20230118141007-0773f68325cd
github.com/smartcontractkit/chainlink-relay v0.1.6-0.20230215211851-4d12e4c7e9ef
github.com/smartcontractkit/libocr v0.0.0-20221121171434-482da3ed36d8
github.com/stretchr/testify v1.7.5
go.uber.org/multierr v1.8.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/smartcontractkit/chainlink-relay v0.1.6-0.20230118141007-0773f68325cd h1:f7QkXFVgYyjcGTKRbtBc14azb9kBxbXnZ4qAMcOgAns=
github.com/smartcontractkit/chainlink-relay v0.1.6-0.20230118141007-0773f68325cd/go.mod h1:5k0uC8R2ILaP/hs81M1ySmyHWtrRz0Bvx9dEVJjdu8o=
github.com/smartcontractkit/chainlink-relay v0.1.6-0.20230215211851-4d12e4c7e9ef h1:edRoDaR6gxYKU0vt5sAeH6QHw29B8CwuVp55ArZeM2c=
github.com/smartcontractkit/chainlink-relay v0.1.6-0.20230215211851-4d12e4c7e9ef/go.mod h1:5k0uC8R2ILaP/hs81M1ySmyHWtrRz0Bvx9dEVJjdu8o=
github.com/smartcontractkit/libocr v0.0.0-20221121171434-482da3ed36d8 h1:KcTNxuP5g3GGUqn3WJe7KKnTixqfVZjmHnMAnKkLGJw=
github.com/smartcontractkit/libocr v0.0.0-20221121171434-482da3ed36d8/go.mod h1:5JnCHuYgmIP9ZyXzgAfI5Iwu0WxBtBKp+ApeT5o1Cjw=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
Expand Down
9 changes: 9 additions & 0 deletions pkg/solana/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ func (r *Relayer) Healthy() error {
return r.chainSet.Healthy()
}

// Healthy only if all subservices are healthy
func (r *Relayer) RegisterHealthCheck(hc relaytypes.Checker) error {
return hc.Register("", r)
}

func (r *Relayer) NewConfigProvider(args relaytypes.RelayArgs) (relaytypes.ConfigProvider, error) {
configWatcher, err := newConfigProvider(r.ctx, r.lggr, r.chainSet, args)
if err != nil {
Expand Down Expand Up @@ -189,6 +194,10 @@ func (c *configProvider) Close() error {
})
}

func (c *configProvider) RegisterHealthCheck(hc relaytypes.Checker) error {
return hc.Register("", c)
}

func (c *configProvider) OffchainConfigDigester() types.OffchainConfigDigester {
return c.offchainConfigDigester
}
Expand Down

0 comments on commit 38ff4d6

Please sign in to comment.