@@ -474,7 +474,7 @@ const (
474
474
// Any time we add new errors, we should audit all callers of this.
475
475
)
476
476
477
- // pokeUDP tries to connect to a host on a port and send the given request. Callers
477
+ // PokeUDP tries to connect to a host on a port and send the given request. Callers
478
478
// can specify additional success parameters, if desired.
479
479
//
480
480
// The result status will be characterized as precisely as possible, given the
@@ -484,7 +484,7 @@ const (
484
484
//
485
485
// The result response will be populated if the UDP transaction was completed, even
486
486
// if the other test params make this a failure).
487
- func pokeUDP (host string , port int , request string , params * UDPPokeParams ) UDPPokeResult {
487
+ func PokeUDP (host string , port int , request string , params * UDPPokeParams ) UDPPokeResult {
488
488
hostPort := net .JoinHostPort (host , strconv .Itoa (port ))
489
489
url := fmt .Sprintf ("udp://%s" , hostPort )
490
490
@@ -577,7 +577,7 @@ func pokeUDP(host string, port int, request string, params *UDPPokeParams) UDPPo
577
577
// testReachableUDP tests that the given host serves UDP on the given port.
578
578
func testReachableUDP (ctx context.Context , host string , port int , timeout time.Duration ) {
579
579
pollfn := func (ctx context.Context ) (bool , error ) {
580
- result := pokeUDP (host , port , "echo hello" , & UDPPokeParams {
580
+ result := PokeUDP (host , port , "echo hello" , & UDPPokeParams {
581
581
Timeout : 3 * time .Second ,
582
582
Response : "hello" ,
583
583
})
@@ -595,7 +595,7 @@ func testReachableUDP(ctx context.Context, host string, port int, timeout time.D
595
595
// testNotReachableUDP tests that the given host doesn't serve UDP on the given port.
596
596
func testNotReachableUDP (ctx context.Context , host string , port int , timeout time.Duration ) {
597
597
pollfn := func (ctx context.Context ) (bool , error ) {
598
- result := pokeUDP (host , port , "echo hello" , & UDPPokeParams {Timeout : 3 * time .Second })
598
+ result := PokeUDP (host , port , "echo hello" , & UDPPokeParams {Timeout : 3 * time .Second })
599
599
if result .Status != UDPSuccess && result .Status != UDPError {
600
600
return true , nil
601
601
}
0 commit comments