@@ -15,10 +15,10 @@ type Health struct {
1515 // for the health check server.
1616 // It cannot be the empty string in the internal state.
1717 ServerAddress string
18- // AddressToPing is the IP address or domain name to
19- // ping periodically for the health check.
18+ // TargetAddress is the address (host or host:port)
19+ // to TCP dial to periodically for the health check.
2020 // It cannot be the empty string in the internal state.
21- AddressToPing string
21+ TargetAddress string
2222 VPN HealthyWait
2323}
2424
@@ -42,7 +42,7 @@ func (h Health) Validate() (err error) {
4242func (h * Health ) copy () (copied Health ) {
4343 return Health {
4444 ServerAddress : h .ServerAddress ,
45- AddressToPing : h .AddressToPing ,
45+ TargetAddress : h .TargetAddress ,
4646 VPN : h .VPN .copy (),
4747 }
4848}
@@ -51,7 +51,7 @@ func (h *Health) copy() (copied Health) {
5151// unset field of the receiver settings object.
5252func (h * Health ) MergeWith (other Health ) {
5353 h .ServerAddress = helpers .MergeWithString (h .ServerAddress , other .ServerAddress )
54- h .AddressToPing = helpers .MergeWithString (h .AddressToPing , other .AddressToPing )
54+ h .TargetAddress = helpers .MergeWithString (h .TargetAddress , other .TargetAddress )
5555 h .VPN .mergeWith (other .VPN )
5656}
5757
@@ -60,13 +60,13 @@ func (h *Health) MergeWith(other Health) {
6060// settings.
6161func (h * Health ) OverrideWith (other Health ) {
6262 h .ServerAddress = helpers .OverrideWithString (h .ServerAddress , other .ServerAddress )
63- h .AddressToPing = helpers .OverrideWithString (h .AddressToPing , other .AddressToPing )
63+ h .TargetAddress = helpers .OverrideWithString (h .TargetAddress , other .TargetAddress )
6464 h .VPN .overrideWith (other .VPN )
6565}
6666
6767func (h * Health ) SetDefaults () {
6868 h .ServerAddress = helpers .DefaultString (h .ServerAddress , "127.0.0.1:9999" )
69- h .AddressToPing = helpers .DefaultString (h .AddressToPing , "github.com" )
69+ h .TargetAddress = helpers .DefaultString (h .TargetAddress , "github.com:443 " )
7070 h .VPN .setDefaults ()
7171}
7272
@@ -77,7 +77,7 @@ func (h Health) String() string {
7777func (h Health ) toLinesNode () (node * gotree.Node ) {
7878 node = gotree .New ("Health settings:" )
7979 node .Appendf ("Server listening address: %s" , h .ServerAddress )
80- node .Appendf ("Address to ping : %s" , h .AddressToPing )
80+ node .Appendf ("Target address : %s" , h .TargetAddress )
8181 node .AppendNode (h .VPN .toLinesNode ("VPN" ))
8282 return node
8383}
0 commit comments