Documentation ¶
Overview ¶
Package tcpprobe implements a TCP probe.
Index ¶
- Constants
- func Alert(fn prober.AlertFn) func(*TcpProber)
- func Name(name string) func(*TcpProber)
- func New(target string, options ...func(*TcpProber)) *prober.Probe
- func NewWithGeneric(target string, genericOpts []prober.Option, options ...func(*TcpProber)) *prober.Probe
- func Timeout(timeout time.Duration) func(*TcpProber)
- type TcpProber
Constants ¶
View Source
const (
MaxResponseBytes int64 = 10e5 // largest response size accepted
)
Variables ¶
This section is empty.
Functions ¶
func Alert ¶
Alert sets a custom alerting function.
If Alert is not called, the probes.SendAlertEmail function is called.
func NewWithGeneric ¶
func NewWithGeneric(target string, genericOpts []prober.Option, options ...func(*TcpProber)) *prober.Probe
NewWithGeneric returns a new instance of the tcp probe with specified options.
NewWithGeneric passes through specified prober.Options, after applying the tcpprobe-specific options.
Types ¶
type TcpProber ¶
type TcpProber struct { Target string // host to probe Name string // name of the prober Timeout time.Duration // maximum duration to be allowed // contains filtered or unexported fields }
TcpProber probes a target's HTTP response.
Click to show internal directories.
Click to hide internal directories.