Documentation ¶
Overview ¶
Package varsprobe implements a probe for /vars, i.e. expvar package variables.
Index ¶
- func Alert(fn prober.AlertFn) func(*VarsProber)
- func Desc(desc string) func(*VarsProber)
- func Key(k string) func(*VarsProber)
- func Name(name string) func(*VarsProber)
- func New(target string, options ...func(*VarsProber)) *prober.Probe
- func NewWithGeneric(target string, genericOpts []prober.Option, options ...func(*VarsProber)) *prober.Probe
- func WantValue(v string) func(*VarsProber)
- type VarsProber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alert ¶
func Alert(fn prober.AlertFn) func(*VarsProber)
Alert sets a custom alerting function.
If Alert is not called, the probes.SendAlertEmail function is called.
func New ¶
func New(target string, options ...func(*VarsProber)) *prober.Probe
New returns a new instance of the vars probe with specified options.
func NewWithGeneric ¶
func NewWithGeneric(target string, genericOpts []prober.Option, options ...func(*VarsProber)) *prober.Probe
NewWithGeneric returns a new instance of the vars probe with specified options.
NewWithGeneric passes through specified prober.Options, after applying the varsprobe-specific options.
func WantValue ¶
func WantValue(v string) func(*VarsProber)
WantValue sets value to expect key to have.
Types ¶
type VarsProber ¶
type VarsProber struct { Target string // addr to probe /vars for Key string // variable key to probe for // contains filtered or unexported fields }
VarsProber probes a target host's /vars page.
func (*VarsProber) Alert ¶
Alert calls the prober.AlertFn for the prober.
If no prober.AlertFn was set with the Alert() option, probes.SendAlertEmail is used by default.
func (*VarsProber) Probe ¶
func (p *VarsProber) Probe() prober.Result
Probe verifies that the target's /vars page is as expected.
func (VarsProber) String ¶
func (p VarsProber) String() string
String returns the human-readable description of the prober.