probe/service/MachineService.go
crusader 14cd4345d7 ing
2018-08-23 19:00:34 +09:00

25 lines
542 B
Go

package service
import (
"reflect"
oa "git.loafle.net/overflow/annotation-go"
od "git.loafle.net/overflow/di-go"
omn "git.loafle.net/overflow/model/net"
"git.loafle.net/overflow_scanner/probe/nic"
)
func init() {
od.RegisterType(MachineServiceType)
}
var MachineServiceType = reflect.TypeOf((*MachineService)(nil))
type MachineService struct {
oa.TypeAnnotation `annotation:"@Injectable('name': 'MachineService') @Service()"`
}
func (s *MachineService) Interfaces() ([]*omn.Interface, error) {
return nic.DiscoverInterfaces()
}