ing
This commit is contained in:
parent
419c5cb6ac
commit
e8cff368de
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func PingHost(_host *omd.Host, pingOption ounp.Option) (ounp.Result, error) {
|
||||
return host.Ping(host, pingOption)
|
||||
return host.Ping(_host, pingOption)
|
||||
}
|
||||
|
||||
func PingService(_service *omd.Service, pingOption *ounp.PingOption) (ounp.Result, error) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"log"
|
||||
"reflect"
|
||||
|
||||
oa "git.loafle.net/overflow/annotation-go"
|
||||
|
@ -32,11 +33,23 @@ func (s *PingService) DestroyService() {
|
|||
}
|
||||
|
||||
func (s *PingService) PingHost(host *omd.Host, pingOption *ounp.PingOption) (*ounp.PingResult, error) {
|
||||
return ping.PingHost(host, pingOption)
|
||||
result, err := ping.PingHost(host, pingOption)
|
||||
if nil != err {
|
||||
log.Print(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return result.(*ounp.PingResult), nil
|
||||
}
|
||||
|
||||
func (s *PingService) PingService(service *omd.Service, pingOption *ounp.PingOption) (*ounp.PingResult, error) {
|
||||
return ping.PingService(service, pingOption)
|
||||
result, err := ping.PingService(service, pingOption)
|
||||
if nil != err {
|
||||
log.Print(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return result.(*ounp.PingResult), nil
|
||||
}
|
||||
|
||||
func (s *PingService) PingAll() error {
|
||||
|
|
Loading…
Reference in New Issue
Block a user