32 lines
646 B
Go
32 lines
646 B
Go
package service
|
|
|
|
import (
|
|
"log"
|
|
"reflect"
|
|
|
|
oa "git.loafle.net/overflow/annotation-go"
|
|
od "git.loafle.net/overflow/di-go"
|
|
omd "git.loafle.net/overflow/model/discovery"
|
|
"git.loafle.net/overflow_scanner/probe/model"
|
|
)
|
|
|
|
func init() {
|
|
od.RegisterType(DiscoveryServiceType)
|
|
}
|
|
|
|
var DiscoveryServiceType = reflect.TypeOf((*DiscoveryService)(nil))
|
|
|
|
type DiscoveryService struct {
|
|
oa.TypeAnnotation `annotation:"@Injectable('name': 'DiscoveryService') @Service()"`
|
|
}
|
|
|
|
func (s *DiscoveryService) StartDiscover(zone *omd.Zone) error {
|
|
d := model.New(zone)
|
|
log.Print(d)
|
|
return nil
|
|
}
|
|
|
|
func (s *DiscoveryService) StopDiscover() error {
|
|
return nil
|
|
}
|