-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rm plugins/cmd/chainlink-solana (#10973)
- Loading branch information
Showing
38 changed files
with
134 additions
and
1,190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,11 @@ | ||
package services | ||
|
||
import ( | ||
"errors" | ||
"testing" | ||
"github.com/smartcontractkit/chainlink-relay/pkg/services" | ||
) | ||
|
||
// Checkable should be implemented by any type requiring health checks. | ||
// From the k8s docs: | ||
// > ready means it’s initialized and healthy means that it can accept traffic in kubernetes | ||
// See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ | ||
type Checkable interface { | ||
// Ready should return nil if ready, or an error message otherwise. | ||
Ready() error | ||
// HealthReport returns a full health report of the callee including it's dependencies. | ||
// key is the dep name, value is nil if healthy, or error message otherwise. | ||
// See CopyHealth. | ||
HealthReport() map[string]error | ||
// Name returns the fully qualified name of the component. Usually the logger name. | ||
Name() string | ||
} | ||
// Deprecated: use services.HealthReporter | ||
type Checkable = services.HealthReporter | ||
|
||
// CopyHealth copies health statuses from src to dest. | ||
// If duplicate names are encountered, the errors are joined, unless testing in which case a panic is thrown. | ||
func CopyHealth(dest, src map[string]error) { | ||
for name, err := range src { | ||
errOrig, ok := dest[name] | ||
if ok { | ||
if testing.Testing() { | ||
panic("service names must be unique: duplicate name: " + name) | ||
} | ||
if errOrig != nil { | ||
dest[name] = errors.Join(errOrig, err) | ||
continue | ||
} | ||
} | ||
dest[name] = err | ||
} | ||
} | ||
// Deprecated: use services.CopyHealth | ||
func CopyHealth(dest, src map[string]error) { services.CopyHealth(dest, src) } |
Oops, something went wrong.