Documentation
¶
Index ¶
Constants ¶
const ( // ConsulHealthCheckTimeout is the timeout for Consul health checks ConsulHealthCheckTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func ConsulClient ¶
ConsulClient creates a new Consul API client
func ConsulURL ¶
func ConsulURL() string
ConsulURL returns the Consul URL from environment or default
func IsConsulAvailable ¶
func IsConsulAvailable() bool
IsConsulAvailable checks if Consul is running and accessible with timeout handling
Types ¶
type Forwarder ¶ added in v0.35.0
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder is a TCP forwarder a test can switch: it stands between a host and its relay, so a test can cut the tunnel, silence it, or send the next connection somewhere else, the way a network does.
func NewForwarder ¶ added in v0.35.0
NewForwarder forwards every connection to its address on to target, until the test ends.
func (*Forwarder) Blackhole ¶ added in v0.35.0
func (f *Forwarder) Blackhole()
Blackhole makes every connection forwarded so far pass nothing more, in either direction, while staying open at both ends, as a link that went silent without either end hearing so. Connections accepted afterwards pass normally, so a host can redial past a blackholed one.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fakerelay is an SSH server standing in for uptermd, for tests that need a relay to answer as the real one doesn't: with a random ID to a proven registration, as a relay without proofs does, with a scripted refusal, or by refusing a key at authentication.
|
Package fakerelay is an SSH server standing in for uptermd, for tests that need a relay to answer as the real one doesn't: with a random ID to a proven registration, as a relay without proofs does, with a scripted refusal, or by refusing a key at authentication. |