mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-12 04:37:33 +00:00
move MapResponse peer logic into function and reuse
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:

committed by
Kristoffer Dalby

parent
387aa03adb
commit
432e975a7f
@@ -20,10 +20,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
tsicHashLength = 6
|
||||
defaultPingCount = 10
|
||||
dockerContextPath = "../."
|
||||
headscaleCertPath = "/usr/local/share/ca-certificates/headscale.crt"
|
||||
tsicHashLength = 6
|
||||
defaultPingTimeout = 300 * time.Millisecond
|
||||
defaultPingCount = 10
|
||||
dockerContextPath = "../."
|
||||
headscaleCertPath = "/usr/local/share/ca-certificates/headscale.crt"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -591,7 +592,7 @@ func WithPingUntilDirect(direct bool) PingOption {
|
||||
// TODO(kradalby): Make multiping, go routine magic.
|
||||
func (t *TailscaleInContainer) Ping(hostnameOrIP string, opts ...PingOption) error {
|
||||
args := pingArgs{
|
||||
timeout: 300 * time.Millisecond,
|
||||
timeout: defaultPingTimeout,
|
||||
count: defaultPingCount,
|
||||
direct: true,
|
||||
}
|
||||
|
Reference in New Issue
Block a user