This commit is contained in:
crusader
2018-08-23 18:21:48 +09:00
parent 30075ad015
commit b099b2756e
20 changed files with 516 additions and 70 deletions

View File

@@ -0,0 +1,26 @@
package service
import (
"reflect"
oa "git.loafle.net/overflow/annotation-go"
od "git.loafle.net/overflow/di-go"
)
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() {
}
func (s *DiscoveryService) StopDiscover() {
}

22
service/MachineService.go Normal file
View File

@@ -0,0 +1,22 @@
package service
import (
"reflect"
oa "git.loafle.net/overflow/annotation-go"
od "git.loafle.net/overflow/di-go"
)
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() {
}

30
service/PingService.go Normal file
View File

@@ -0,0 +1,30 @@
package service
import (
"reflect"
oa "git.loafle.net/overflow/annotation-go"
od "git.loafle.net/overflow/di-go"
)
func init() {
od.RegisterType(PingServiceType)
}
var PingServiceType = reflect.TypeOf((*PingService)(nil))
type PingService struct {
oa.TypeAnnotation `annotation:"@Injectable('name': 'PingService') @Service()"`
}
func (s *PingService) PingHost() {
}
func (s *PingService) PingService() {
}
func (s *PingService) PingAll() {
}

26
service/SNMPService.go Normal file
View File

@@ -0,0 +1,26 @@
package service
import (
"reflect"
oa "git.loafle.net/overflow/annotation-go"
od "git.loafle.net/overflow/di-go"
)
func init() {
od.RegisterType(SNMPServiceType)
}
var SNMPServiceType = reflect.TypeOf((*SNMPService)(nil))
type SNMPService struct {
oa.TypeAnnotation `annotation:"@Injectable('name': 'SNMPService') @Service()"`
}
func (s *SNMPService) ScanSNMP() {
}
func (s *SNMPService) PingSNMP() {
}

View File

@@ -1,17 +0,0 @@
package service
/*
StartProcess()
StopProcess()
Interfaces()
StartDiscover()
StopDiscover()
PingHost()
PingService()
PingAll() // hosts, services, snmp
ScanSNMP() // by a host
PingSNMP()
*/