check

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check interface {
	GetName() string
	GetDescription() string
	Run(transport.Transport) *Result
	GetOptions() map[string]string
}

Check the check interface

func GetCheck

func GetCheck(name string, options map[string]string) (Check, error)

GetCheck returns a check instance

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command the struct

func NewCheckCommand

func NewCheckCommand(options map[string]string) (*Command, error)

NewCheckCommand creates a disk check instance

func (*Command) GetDescription

func (c *Command) GetDescription() string

GetDescription get description

func (*Command) GetName

func (c *Command) GetName() string

GetName returns the check name

func (*Command) GetOptions

func (c *Command) GetOptions() map[string]string

GetOptions returns the options

func (*Command) Run

func (c *Command) Run(t transport.Transport) *Result

Run executes the check

type Disk

type Disk struct {
	// contains filtered or unexported fields
}

Disk the disk struct

func NewCheckDisk

func NewCheckDisk(options map[string]string) (*Disk, error)

NewCheckDisk creates a disk check instance

func (*Disk) GetDescription

func (c *Disk) GetDescription() string

GetDescription returns description

func (*Disk) GetName

func (c *Disk) GetName() string

GetName returns the check name

func (*Disk) GetOptions

func (c *Disk) GetOptions() map[string]string

GetOptions returns the options

func (*Disk) Run

func (c *Disk) Run(t transport.Transport) *Result

Run executes the check

type Loadavg

type Loadavg struct {
	// contains filtered or unexported fields
}

Loadavg the loadavg struct

func NewCheckLoadAvg

func NewCheckLoadAvg(options map[string]string) (*Loadavg, error)

NewCheckLoadAvg creates a disk check instance

func (*Loadavg) GetDescription

func (c *Loadavg) GetDescription() string

GetDescription get description

func (*Loadavg) GetName

func (c *Loadavg) GetName() string

GetName returns the check name

func (*Loadavg) GetOptions

func (c *Loadavg) GetOptions() map[string]string

GetOptions returns the options

func (*Loadavg) Run

func (c *Loadavg) Run(t transport.Transport) *Result

Run executes the check

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

Memory the memory struct

func NewCheckMemory

func NewCheckMemory(options map[string]string) (*Memory, error)

NewCheckMemory creates a disk check instance

func (*Memory) GetDescription

func (c *Memory) GetDescription() string

GetDescription get description

func (*Memory) GetName

func (c *Memory) GetName() string

GetName returns the check name

func (*Memory) GetOptions

func (c *Memory) GetOptions() map[string]string

GetOptions returns the options

func (*Memory) Run

func (c *Memory) Run(t transport.Transport) *Result

Run executes the check

type Port

type Port struct {
	// contains filtered or unexported fields
}

Port the port struct

func NewCheckPort

func NewCheckPort(options map[string]string) (*Port, error)

NewCheckPort creates a disk check instance

func (*Port) GetDescription

func (c *Port) GetDescription() string

GetDescription get description

func (*Port) GetName

func (c *Port) GetName() string

GetName returns the check name

func (*Port) GetOptions

func (c *Port) GetOptions() map[string]string

GetOptions returns the options

func (*Port) Run

func (c *Port) Run(t transport.Transport) *Result

Run executes the check

type Process

type Process struct {
	// contains filtered or unexported fields
}

Process the process struct

func NewCheckProcess

func NewCheckProcess(options map[string]string) (*Process, error)

NewCheckProcess creates a disk check instance

func (*Process) GetDescription

func (c *Process) GetDescription() string

GetDescription get description

func (*Process) GetName

func (c *Process) GetName() string

GetName returns the check name

func (*Process) GetOptions

func (c *Process) GetOptions() map[string]string

GetOptions returns the options

func (*Process) Run

func (c *Process) Run(t transport.Transport) *Result

Run executes the check

type Reachable

type Reachable struct {
	// contains filtered or unexported fields
}

Reachable the port struct

func NewCheckReachable

func NewCheckReachable(map[string]string) (*Reachable, error)

NewCheckReachable creates a disk check instance

func (*Reachable) GetDescription

func (c *Reachable) GetDescription() string

GetDescription get description

func (*Reachable) GetName

func (c *Reachable) GetName() string

GetName returns the check name

func (*Reachable) GetOptions

func (c *Reachable) GetOptions() map[string]string

GetOptions returns the options

func (*Reachable) Run

func (c *Reachable) Run(t transport.Transport) *Result

Run executes the check

type Result

type Result struct {
	Name        string
	Description string
	Value       string
	Limit       string
	Error       error
}

Result check result struct

type Script

type Script struct {
	// contains filtered or unexported fields
}

Script the Script struct

func NewCheckScript

func NewCheckScript(options map[string]string) (*Script, error)

NewCheckScript creates a script check instance

func (*Script) GetDescription

func (c *Script) GetDescription() string

GetDescription get description

func (*Script) GetName

func (c *Script) GetName() string

GetName returns the check name

func (*Script) GetOptions

func (c *Script) GetOptions() map[string]string

GetOptions returns the options

func (*Script) Run

func (c *Script) Run(t transport.Transport) *Result

Run executes the check

type Uptime

type Uptime struct {
	// contains filtered or unexported fields
}

Uptime the uptime struct

func NewCheckUptime

func NewCheckUptime(options map[string]string) (*Uptime, error)

NewCheckUptime creates a disk check instance

func (*Uptime) GetDescription

func (c *Uptime) GetDescription() string

GetDescription get description

func (*Uptime) GetName

func (c *Uptime) GetName() string

GetName returns the check name

func (*Uptime) GetOptions

func (c *Uptime) GetOptions() map[string]string

GetOptions returns the options

func (*Uptime) Run

func (c *Uptime) Run(t transport.Transport) *Result

Run executes the check

Jump to

Keyboard shortcuts

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