* refactor(worker): Move tcp_proxy into its own package This refactors: - the tcp_proxy.go into worker/proxy/tcp - add a missing unit test for the HandleTcpProxyV1 - refactors session.go into worker/session, needed to avoid import cycle - adds a baseline for a mock controller session client - go lint fixes * Add sleep between spinning listener goroutine and dialing Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
18 lines
472 B
Go
18 lines
472 B
Go
package common
|
|
|
|
import "time"
|
|
|
|
// In the future we could make this configurable
|
|
const (
|
|
// StatusInterval is the base duration used in the calculation of the random backoff
|
|
// during the worker status report
|
|
StatusInterval = 2 * time.Second
|
|
|
|
// StatusTimeout is the timeout duration on status calls to the controller from
|
|
// the worker
|
|
StatusTimeout = 5 * time.Second
|
|
)
|
|
|
|
// CredentialData represents the secret data of the credential
|
|
type CredentialData interface{}
|