ing
This commit is contained in:
parent
d2cd8ed86a
commit
7fe426dd07
|
@ -36,6 +36,8 @@ func (pm *probeManagers) Start() error {
|
|||
logging.Logger().Panic("Probe: already running. Stop it before starting it again")
|
||||
}
|
||||
|
||||
oops.InitService()
|
||||
|
||||
probeRPCRegistry := crr.NewRPCRegistry()
|
||||
|
||||
centralProbeClient := oopccp.New(probeRPCRegistry)
|
||||
|
@ -46,8 +48,6 @@ func (pm *probeManagers) Start() error {
|
|||
}
|
||||
cdr.RegisterResource("CentralClients", centralClients)
|
||||
|
||||
oops.InitService()
|
||||
|
||||
services := cdr.GetInstancesByAnnotationName(oopca.ServiceTag)
|
||||
|
||||
for _, s := range services {
|
||||
|
|
|
@ -21,35 +21,35 @@ type DiscoveryService struct {
|
|||
CentralService *CentralService `annotation:"@Inject()"`
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoverZone(dz *discoveryM.DiscoveryZone) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverZone", dz)
|
||||
func (ds *DiscoveryService) DiscoverZone(requesterID string, dz *discoveryM.DiscoveryZone) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverZone", requesterID, dz)
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoverHost(zone *discoveryM.Zone, dh *discoveryM.DiscoveryHost) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverHost", zone, dh)
|
||||
func (ds *DiscoveryService) DiscoverHost(requesterID string, zone *discoveryM.Zone, dh *discoveryM.DiscoveryHost) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverHost", requesterID, zone, dh)
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoverPort(host *discoveryM.Host, dp *discoveryM.DiscoveryPort) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverPort", host, dp)
|
||||
func (ds *DiscoveryService) DiscoverPort(requesterID string, host *discoveryM.Host, dp *discoveryM.DiscoveryPort) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverPort", requesterID, host, dp)
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoverService(port *discoveryM.Port, dService *discoveryM.DiscoveryService) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverZone", port, dService)
|
||||
func (ds *DiscoveryService) DiscoverService(requesterID string, port *discoveryM.Port, dService *discoveryM.DiscoveryService) error {
|
||||
return ds.ContainerService.Send(oocmpsp.ProbeContainerNameDiscovery, "DiscoveryService.DiscoverZone", requesterID, port, dService)
|
||||
}
|
||||
|
||||
// use by discovery
|
||||
func (ds *DiscoveryService) DiscoveredZone(zone *discoveryM.Zone) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.DiscoveredZone", zone)
|
||||
func (ds *DiscoveryService) DiscoveredZone(requesterID string, zone *discoveryM.Zone) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.discoveredZone", requesterID, zone)
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoveredHost(host *discoveryM.Host) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.DiscoveredHost", host)
|
||||
func (ds *DiscoveryService) DiscoveredHost(requesterID string, host *discoveryM.Host) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.discoveredHost", requesterID, host)
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoveredPort(port *discoveryM.Port) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.DiscoveredPort", port)
|
||||
func (ds *DiscoveryService) DiscoveredPort(requesterID string, port *discoveryM.Port) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.discoveredPort", requesterID, port)
|
||||
}
|
||||
|
||||
func (ds *DiscoveryService) DiscoveredService(service *discoveryM.Service) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.DiscoveredService", service)
|
||||
func (ds *DiscoveryService) DiscoveredService(requesterID string, service *discoveryM.Service) error {
|
||||
return ds.CentralService.Send(oocmp.HTTPEntry_Probe, "DiscoveryService.discoveredService", requesterID, service)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user