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 ¶
Port represents a port check
func (*Port) Apply ¶
func (p *Port) Apply() (resource.TaskStatus, error)
Apply retries the check until it passes or returns max failure threshold
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. 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. The format is Go's duration // string. A duration string is a possibly signed sequence of decimal numbers, // each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or // "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If // the interval is not specified, it will default to 5 seconds. Interval string `hcl:"interval" doc_type:"duration string"` // the amount of time to wait before running the first check and after a // successful check. The format is Go's duration string. A duration string is // a possibly signed sequence of decimal numbers, each with optional fraction // and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units // are "ns", "us" (or "µs"), "ms", "s", "m", "h". If no grace period is // specified, no grace period will be taken into account. GracePeriod string `hcl:"grace_period" doc_type:"duration string"` // 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.