Documentation ¶
Index ¶
- func CreateHTTPProbe(options ProbeOptions) (ProbeOptions, ProbeFunc)
- func CreateNetProbe(options ProbeOptions) (ProbeOptions, ProbeFunc)
- func CreateProbe(options ProbeOptions) (ProbeFunc, ProbeOptions, error)
- func RunProbe(options ProbeOptions, probeFunc ProbeFunc) error
- type ProbeFunc
- type ProbeFuncFactory
- type ProbeOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHTTPProbe ¶
func CreateHTTPProbe(options ProbeOptions) (ProbeOptions, ProbeFunc)
CreateHTTPProbe uses default http.Get to test connectivity to an HTTP|HTTPS endpoint
func CreateNetProbe ¶
func CreateNetProbe(options ProbeOptions) (ProbeOptions, ProbeFunc)
CreateNetProbe uses default net.DialTimeout to test connectivity to a TCP or UDP endpoint
func CreateProbe ¶
func CreateProbe(options ProbeOptions) (ProbeFunc, ProbeOptions, error)
func RunProbe ¶
func RunProbe(options ProbeOptions, probeFunc ProbeFunc) error
RunProbe attempts to validate connectivity to an arbitrary network and port
Types ¶
type ProbeFunc ¶
type ProbeFunc func() error
ProbeFunc a function which returns an error if a target cannot be reached or fails its probe chekc
type ProbeFuncFactory ¶
type ProbeFuncFactory func(ctx context.Context, options ProbeOptions) (ProbeOptions, ProbeFunc)
ProbeFuncFactory a generic connection interface to wrap dialer's
Click to show internal directories.
Click to hide internal directories.