mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 01:50:55 +00:00
Fix golint for pkg/probe
This change adds comments to exported things and renames the tcp, http, and exec probe interfaces to just be Prober within their namespace. Issue #68026
This commit is contained in:
@@ -26,16 +26,19 @@ import (
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
func New() TCPProber {
|
||||
// New creates Prober.
|
||||
func New() Prober {
|
||||
return tcpProber{}
|
||||
}
|
||||
|
||||
type TCPProber interface {
|
||||
// Prober is an interface that defines the Probe function for doing TCP readiness/liveness checks.
|
||||
type Prober interface {
|
||||
Probe(host string, port int, timeout time.Duration) (probe.Result, string, error)
|
||||
}
|
||||
|
||||
type tcpProber struct{}
|
||||
|
||||
// Probe returns a ProbeRunner capable of running an TCP check.
|
||||
func (pr tcpProber) Probe(host string, port int, timeout time.Duration) (probe.Result, string, error) {
|
||||
return DoTCPProbe(net.JoinHostPort(host, strconv.Itoa(port)), timeout)
|
||||
}
|
||||
|
Reference in New Issue
Block a user