checkers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func CheckingElasticsearchFn

func CheckingElasticsearchFn(config ElasticsearchConfig) checker.CmdFn

func CheckingHDDFn

func CheckingHDDFn(path string, size uint64) checker.CmdFn

func CheckingNodeFn

func CheckingNodeFn(min string) checker.CmdFn

func CheckingPostgresDatabaseFn

func CheckingPostgresDatabaseFn(config PostgresDBConfig) checker.CmdFn

func CheckingRabbitFn

func CheckingRabbitFn(config RabbitConfig) checker.CmdFn

func CheckingRedisFn

func CheckingRedisFn(config RedisConfig) checker.CmdFn

Types

type DiskStatus

type DiskStatus struct {
	All  uint64
	Used uint64
	Free uint64
}

func DiskUsage

func DiskUsage(path string) (disk DiskStatus)

func (DiskStatus) AllString

func (d DiskStatus) AllString() string

func (DiskStatus) FreeString

func (d DiskStatus) FreeString() string

func (DiskStatus) HasFree

func (d DiskStatus) HasFree(size uint64) bool

func (DiskStatus) String

func (d DiskStatus) String() string

func (DiskStatus) UsedString

func (d DiskStatus) UsedString() string

type ElasticsearchConfig

type ElasticsearchConfig struct {
	Host string
	Port int
}

type EsResponse

type EsResponse struct {
	Name    string    `json:"name"`
	Version EsVersion `json:"version"`
}

func (EsResponse) String

func (r EsResponse) String() string

type EsVersion

type EsVersion struct {
	Number        string `json:"number"`
	BuildType     string `json:"build_type"`
	LuceneVersion string `json:"lucene_version"`
}

type PostgresDBConfig

type PostgresDBConfig struct {
	Database string
	Host     string
	Username string
	Password string
	Port     int
}

type RabbitConfig

type RabbitConfig struct {
	Host     string
	Username string
	Password string
	Port     int
}

type RabbitResponse

type RabbitResponse struct {
	Name    string `json:"product_name"`
	Version string `json:"product_version"`
}

type RedisConfig

type RedisConfig struct {
	Host     string
	Password string
	Port     int
	DB       int
}

Jump to

Keyboard shortcuts

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