checks

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 13 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check interface {
	Pass() bool
	Name() string
}

func NewContextCheck added in v1.3.0

func NewContextCheck(ctx context.Context, name ...string) Check

type EnvCheck added in v1.2.0

type EnvCheck struct {
	EnvVariable string
	Regex       string
}

func NewEnvCheck added in v1.2.0

func NewEnvCheck(EnvVariable string) EnvCheck

func (EnvCheck) Name added in v1.2.0

func (e EnvCheck) Name() string

func (EnvCheck) Pass added in v1.2.0

func (e EnvCheck) Pass() bool

func (EnvCheck) SetRegexValidator added in v1.2.0

func (e EnvCheck) SetRegexValidator(Regex string)

type InfluxV2Check added in v1.6.0

type InfluxV2Check struct {
	Timeout int
	// contains filtered or unexported fields
}

func NewInfluxV2Check added in v1.6.0

func NewInfluxV2Check(timeout int, client influxdb2.Client) *InfluxV2Check

func (*InfluxV2Check) Name added in v1.6.0

func (i *InfluxV2Check) Name() string

func (*InfluxV2Check) Pass added in v1.6.0

func (i *InfluxV2Check) Pass() bool

type MongoCheck added in v1.6.0

type MongoCheck struct {
	Timeout int
	// contains filtered or unexported fields
}

func NewMongoCheck added in v1.6.0

func NewMongoCheck(timeout int, client *mongo.Client) *MongoCheck

func (*MongoCheck) Name added in v1.6.0

func (m *MongoCheck) Name() string

func (*MongoCheck) Pass added in v1.6.0

func (m *MongoCheck) Pass() bool

type PingCheck added in v1.1.0

type PingCheck struct {
	URL     string
	Method  string
	Timeout int

	Body    io.Reader
	Headers map[string]string
	// contains filtered or unexported fields
}

func NewPingCheck added in v1.1.0

func NewPingCheck(URL, Method string, Timeout int, Body io.Reader, Headers map[string]string) PingCheck

func (PingCheck) Name added in v1.1.0

func (p PingCheck) Name() string

func (PingCheck) Pass added in v1.1.0

func (p PingCheck) Pass() bool

type RedisCheck added in v1.1.0

type RedisCheck struct {
	Client *redis.Client
}

func NewRedisCheck added in v1.1.0

func NewRedisCheck(client *redis.Client) RedisCheck

func (*RedisCheck) Name added in v1.1.0

func (r *RedisCheck) Name() string

func (*RedisCheck) Pass added in v1.1.0

func (r *RedisCheck) Pass() bool

type SqlCheck

type SqlCheck struct {
	Sql *sql.DB
}

func (SqlCheck) Name

func (s SqlCheck) Name() string

func (SqlCheck) Pass

func (s SqlCheck) Pass() bool

Jump to

Keyboard shortcuts

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