ing
This commit is contained in:
26
service/DiscoveryService.go
Normal file
26
service/DiscoveryService.go
Normal 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
22
service/MachineService.go
Normal 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
30
service/PingService.go
Normal 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
26
service/SNMPService.go
Normal 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() {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package service
|
||||
|
||||
/*
|
||||
StartProcess()
|
||||
StopProcess()
|
||||
|
||||
Interfaces()
|
||||
StartDiscover()
|
||||
StopDiscover()
|
||||
|
||||
PingHost()
|
||||
PingService()
|
||||
PingAll() // hosts, services, snmp
|
||||
|
||||
ScanSNMP() // by a host
|
||||
PingSNMP()
|
||||
*/
|
||||
Reference in New Issue
Block a user