contract

package
v0.0.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigKeyLogLevel          = "log-level"
	ConfigKeyNoFail            = "no-fail"
	ConfigKeyNoFailAffirmative = "no-fail-affirmative"
	ConfigKeyOutput            = "output"
	ConfigKeyProbeTimeout      = "timeout"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	String(key string, defaultValue string) string
	Bool(key string, defaultValue bool) bool
	Int(key string, defaultValue int) int
	IntSlice(key string, defaultValue []int) []int
	WithString(key, value string) Config
	WithBool(key string, value bool) Config
	WithInt(key string, value int) Config
	WithIntSlice(key string, value []int) Config
}

type Ecosystem

type Ecosystem interface {
	Config() Config
	Logger() logrus.FieldLogger
	WithConfig(config Config) Ecosystem
}

type HealthCheck

type HealthCheck interface {
	WithLogger(logger logrus.FieldLogger) HealthCheck
	WithProbe(probe Probe) HealthCheck
}

type Probe

type Probe interface {
	assert.TestingT

	HasFailed() bool
	HasPassed() bool
	IsDone() bool
	Run() (string, error)
	Fail(err error)
	Failf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	WithConfig(config Config) Probe
	WithLogger(logger logrus.FieldLogger) Probe
}

type Result

type Result interface {
	Passed() bool
	Failed() bool
	Reason() string
	Error() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL