probe/service/MachineService.go
crusader fdb2635edc ing
2018-09-04 16:07:45 +09:00

36 lines
771 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()"`
_InitService oa.MethodAnnotation `annotation:"@PostConstruct()"`
_DestroyService oa.MethodAnnotation `annotation:"@PreDestroy()"`
}
func (s *MachineService) InitService() {
}
func (s *MachineService) DestroyService() {
}
func (s *MachineService) Interfaces() ([]*omn.Interface, error) {
return nic.DiscoverInterfaces()
}