Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionCheck ¶
ConnectionCheck represents a connection checker
type Port ¶
type Port struct { *wait.Retrier // the hostname Host string `export:"host"` // the TCP port Port int `export:"port"` ConnectionCheck }
Port represents a port check
func (*Port) CheckConnection ¶
CheckConnection attempts to see if a tcp port is open
type Preparer ¶
type Preparer struct { // a host name or ip address. A TCP connection will be attempted at this host // and the specified Port. default: localhost Host string `hcl:"host"` // the TCP port to attempt to connect to. Port int `hcl:"port" required:"true"` // the amount of time to wait in between checks. If the interval is not // specified, it will default to 5 seconds. Interval *time.Duration `hcl:"interval"` // the amount of time to wait before running the first check and after a // successful check. If no grace period is specified, no grace period will be // taken into account. GracePeriod *time.Duration `hcl:"grace_period"` // the maximum number of attempts before the wait fails. If the maximum number // of retries is not set, it will default to 5. MaxRetry *int `hcl:"max_retry"` }
Preparer handles wait.query tasks
type TCPConnectionCheck ¶
type TCPConnectionCheck struct{}
TCPConnectionCheck impelements a ConnectionCheck over TCP
func (*TCPConnectionCheck) CheckConnection ¶
func (t *TCPConnectionCheck) CheckConnection(host string, port int) error
CheckConnection attempts to see if a tcp port is open
Click to show internal directories.
Click to hide internal directories.