Documentation ¶
Overview ¶
Package probes provides API to implement goma probes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("probe not found")
)
Errors for probes.
Functions ¶
func Register ¶
func Register(name string, ctor Constructor)
Register registers a constructor of a kind of probes.
Types ¶
type Constructor ¶
Constructor is a function to create a probe.
params are configuration options for the probe.
type Prober ¶
type Prober interface { // Probe implements a probing method. // // The returned float64 value will be interpreted by the monitor // who run the probe. Errors occurring within the probe should // produce a float64 value indicating the error. // // ctx.Deadline() is always set. // Probe must return immediately when the ctx.Done() is closed. // The return value will not be used in such cases. Probe(ctx context.Context) float64 // String returns a descriptive string for this probe. String() string }
Prober is the interface for probes.
Directories ¶
Path | Synopsis |
---|---|
Package all import all probes to be compiled-in.
|
Package all import all probes to be compiled-in. |
Package exec implements "exec" probe type that runs an arbitrary command.
|
Package exec implements "exec" probe type that runs an arbitrary command. |
Package http implements "http" probe type that test HTTP(S) servers.
|
Package http implements "http" probe type that test HTTP(S) servers. |
Package mysql implements "mysql" probe type that test MySQL servers.
|
Package mysql implements "mysql" probe type that test MySQL servers. |
Click to show internal directories.
Click to hide internal directories.