Documentation ¶
Overview ¶
probe package implements how to check the target status.
Index ¶
- Constants
- Variables
- func CheckPingPermission() error
- func ExecutePlugin(ctx context.Context, r Reporter, scope string, target *url.URL, command string, ...)
- func SplitScheme(scheme string) (probe string, separator rune, variant string)
- type DNSProbe
- type DummyProbe
- type ExecuteProbe
- type HTTPProbe
- type PingProbe
- type PluginProbe
- type Probe
- type Reporter
- type ResourceLocker
- type SourceProbe
- type TCPProbe
Constants ¶
View Source
const (
HTTP_REDIRECT_MAX = 10
)
Variables ¶
View Source
var ( ErrUnsupportedDNSType = errors.New("unsupported DNS type") ErrConflictDNSType = errors.New("DNS type in scheme and query is conflicted") ErrMissingDomainName = errors.New("missing domain name") )
View Source
var ( ErrInvalidURL = errors.New("invalid URL") ErrMissingScheme = errors.New("missing scheme in URL") ErrUnsupportedScheme = errors.New("unsupported scheme") ErrMissingHost = errors.New("missing target host") )
View Source
var ( ErrInvalidSource = errors.New("invalid source") ErrMissingFile = errors.New("missing file") )
View Source
var (
ErrFailedToPreparePing = errors.New("failed to setup ping service")
)
View Source
var (
ErrMissingCommand = errors.New("missing command")
)
View Source
var (
ErrRedirectLoopDetected = errors.New("redirect loop detected")
)
View Source
var (
ErrTCPPortMissing = errors.New("TCP target's port number is required")
)
View Source
var (
HTTPUserAgent = "ayd health check"
)
Functions ¶
func CheckPingPermission ¶
func CheckPingPermission() error
func ExecutePlugin ¶
Types ¶
type DummyProbe ¶
type DummyProbe struct {
// contains filtered or unexported fields
}
func NewDummyProbe ¶
func NewDummyProbe(u *url.URL) (DummyProbe, error)
func (DummyProbe) Status ¶
func (p DummyProbe) Status() api.Status
func (DummyProbe) Target ¶
func (p DummyProbe) Target() *url.URL
type ExecuteProbe ¶
type ExecuteProbe struct {
// contains filtered or unexported fields
}
func NewExecuteProbe ¶
func NewExecuteProbe(u *url.URL) (ExecuteProbe, error)
func (ExecuteProbe) Target ¶
func (p ExecuteProbe) Target() *url.URL
type PluginProbe ¶
type PluginProbe struct {
// contains filtered or unexported fields
}
func NewPluginProbe ¶
func NewPluginProbe(u *url.URL) (PluginProbe, error)
func (PluginProbe) Target ¶
func (p PluginProbe) Target() *url.URL
type ResourceLocker ¶
func NewResourceLocker ¶
func NewResourceLocker() *ResourceLocker
func (*ResourceLocker) Done ¶
func (rl *ResourceLocker) Done()
func (*ResourceLocker) Start ¶
func (rl *ResourceLocker) Start(prepareResource func() (teardown func(), err error)) error
type SourceProbe ¶
type SourceProbe struct {
// contains filtered or unexported fields
}
func NewSourceProbe ¶
func NewSourceProbe(u *url.URL) (SourceProbe, error)
func (SourceProbe) Target ¶
func (p SourceProbe) Target() *url.URL
Click to show internal directories.
Click to hide internal directories.