minor cleanup
This commit is contained in:
parent
47a646e78b
commit
ed440f582f
1 changed files with 5 additions and 16 deletions
|
@ -37,26 +37,15 @@ func CheckService(service ServiceConfig, ctx context.Context) ServiceStatus {
|
|||
url := service.URL()
|
||||
switch url.Scheme {
|
||||
case "http", "https":
|
||||
{
|
||||
serviceResult, status = CheckHTTP200(ctx, url.String())
|
||||
break
|
||||
}
|
||||
|
||||
serviceResult, status = CheckHTTP200(ctx, url.String())
|
||||
case "tcp":
|
||||
{
|
||||
// go includes port in host
|
||||
serviceResult, status = CheckTCPOpen(ctx, url.Host)
|
||||
break
|
||||
}
|
||||
// go includes port in host (url.Host is actually "authority")
|
||||
serviceResult, status = CheckTCPOpen(ctx, url.Host)
|
||||
case "icmp":
|
||||
{
|
||||
// go includes port in host
|
||||
serviceResult, status = CheckICMPUp(ctx, url.Host)
|
||||
break
|
||||
}
|
||||
// go includes port in host (url.Host is actually "authority")
|
||||
serviceResult, status = CheckICMPUp(ctx, url.Host)
|
||||
default:
|
||||
log.Panicf("I can't handle service with scheme: %#v", url.Scheme)
|
||||
break
|
||||
}
|
||||
|
||||
return ServiceStatus{
|
||||
|
|
Loading…
Reference in a new issue