probe/service/DiscoveryService.go

32 lines
646 B
Go
Raw Normal View History

2018-08-23 09:21:48 +00:00
package service
import (
2018-08-28 15:32:03 +00:00
"log"
2018-08-23 09:21:48 +00:00
"reflect"
oa "git.loafle.net/overflow/annotation-go"
od "git.loafle.net/overflow/di-go"
2018-08-28 15:32:03 +00:00
omd "git.loafle.net/overflow/model/discovery"
"git.loafle.net/overflow_scanner/probe/model"
2018-08-23 09:21:48 +00:00
)
func init() {
od.RegisterType(DiscoveryServiceType)
}
var DiscoveryServiceType = reflect.TypeOf((*DiscoveryService)(nil))
type DiscoveryService struct {
oa.TypeAnnotation `annotation:"@Injectable('name': 'DiscoveryService') @Service()"`
}
2018-08-28 15:32:03 +00:00
func (s *DiscoveryService) StartDiscover(zone *omd.Zone) error {
d := model.New(zone)
log.Print(d)
2018-08-23 10:00:34 +00:00
return nil
2018-08-23 09:21:48 +00:00
}
2018-08-23 10:00:34 +00:00
func (s *DiscoveryService) StopDiscover() error {
return nil
2018-08-23 09:21:48 +00:00
}