Documentation
¶
Index ¶
- Constants
- func RegisterChecker(protocol Protocol, factory CheckerFactory)
- type BaseChecker
- func (b *BaseChecker) Check(ctx context.Context, hosts []string, port string, ...) []HostCheckResult
- func (b *BaseChecker) GetTimeout() time.Duration
- func (b *BaseChecker) GetTimeoutBounds() TimeoutBounds
- func (b *BaseChecker) SetTimeout(timeout time.Duration) error
- func (b *BaseChecker) ValidateTimeout(timeout time.Duration) (time.Duration, error)
- type CertInfo
- type CheckError
- type CheckResult
- type Checker
- type CheckerFactory
- type DNSChecker
- type HTTPChecker
- type HTTPSChecker
- type HostCheckResult
- type Protocol
- type Registry
- type SMTPChecker
- type TCPChecker
- type TimeoutBounds
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func RegisterChecker ¶ added in v0.6.0
func RegisterChecker(protocol Protocol, factory CheckerFactory)
Types ¶
type BaseChecker ¶ added in v0.6.0
type BaseChecker struct {
// contains filtered or unexported fields
}
func NewBaseChecker ¶ added in v0.6.0
func NewBaseChecker(bounds TimeoutBounds) BaseChecker
func (*BaseChecker) GetTimeout ¶ added in v0.6.0
func (b *BaseChecker) GetTimeout() time.Duration
func (*BaseChecker) GetTimeoutBounds ¶ added in v0.6.0
func (b *BaseChecker) GetTimeoutBounds() TimeoutBounds
func (*BaseChecker) SetTimeout ¶ added in v0.6.0
func (b *BaseChecker) SetTimeout(timeout time.Duration) error
func (*BaseChecker) ValidateTimeout ¶ added in v0.6.0
type CheckError ¶ added in v0.6.0
type CheckError struct {
// contains filtered or unexported fields
}
func (*CheckError) Error ¶ added in v0.6.0
func (e *CheckError) Error() string
func (*CheckError) Metadata ¶ added in v0.6.0
func (e *CheckError) Metadata() map[string]interface{}
type CheckResult ¶
type Checker ¶
type Checker interface {
Protocol() Protocol
Check(ctx context.Context, hosts []string, port string) []HostCheckResult
GetTimeout() time.Duration
SetTimeout(timeout time.Duration) error
}
func NewChecker ¶
type CheckerFactory ¶ added in v0.6.0
type CheckerFactory func() Checker
type DNSChecker ¶
type DNSChecker struct {
BaseChecker
// contains filtered or unexported fields
}
func NewDNSChecker ¶
func NewDNSChecker() *DNSChecker
func (*DNSChecker) Check ¶
func (c *DNSChecker) Check(ctx context.Context, hosts []string, port string) []HostCheckResult
func (*DNSChecker) Protocol ¶
func (c *DNSChecker) Protocol() Protocol
type HTTPChecker ¶
type HTTPChecker struct {
BaseChecker
// contains filtered or unexported fields
}
func NewHTTPChecker ¶
func NewHTTPChecker() *HTTPChecker
func (*HTTPChecker) Check ¶
func (c *HTTPChecker) Check(ctx context.Context, hosts []string, port string) []HostCheckResult
func (*HTTPChecker) Protocol ¶
func (c *HTTPChecker) Protocol() Protocol
type HTTPSChecker ¶
type HTTPSChecker struct {
BaseChecker
// contains filtered or unexported fields
}
func NewHTTPSChecker ¶
func NewHTTPSChecker() *HTTPSChecker
func (*HTTPSChecker) Check ¶
func (c *HTTPSChecker) Check(ctx context.Context, hosts []string, port string) []HostCheckResult
func (*HTTPSChecker) Protocol ¶
func (c *HTTPSChecker) Protocol() Protocol
type HostCheckResult ¶ added in v0.5.4
type HostCheckResult struct {
Host string
CheckResult
}
type Protocol ¶
type Protocol string
func ListProtocols ¶ added in v0.6.0
func ListProtocols() []Protocol
for future use to list all protocols when some cli flag is used
type SMTPChecker ¶
type SMTPChecker struct {
BaseChecker
// contains filtered or unexported fields
}
func NewSMTPChecker ¶
func NewSMTPChecker() *SMTPChecker
func (*SMTPChecker) Check ¶
func (c *SMTPChecker) Check(ctx context.Context, hosts []string, port string) []HostCheckResult
func (*SMTPChecker) Protocol ¶
func (c *SMTPChecker) Protocol() Protocol
type TCPChecker ¶
type TCPChecker struct {
BaseChecker
// contains filtered or unexported fields
}
func NewTCPChecker ¶
func NewTCPChecker() *TCPChecker
func (*TCPChecker) Check ¶
func (c *TCPChecker) Check(ctx context.Context, hosts []string, port string) []HostCheckResult
func (*TCPChecker) Protocol ¶
func (c *TCPChecker) Protocol() Protocol
Click to show internal directories.
Click to hide internal directories.