2018-04-06 11:02:18 +00:00
|
|
|
import { Injectable } from '@angular/core';
|
2018-06-04 08:25:29 +00:00
|
|
|
import { Observable } from 'rxjs';
|
2018-05-24 06:44:13 +00:00
|
|
|
import { RPCService } from '@loafer/ng-rpc';
|
2018-04-06 11:02:18 +00:00
|
|
|
import {
|
|
|
|
DiscoveryStartInfo,
|
2018-04-27 16:29:54 +00:00
|
|
|
DiscoverZone as MDDiscoverZone,
|
|
|
|
DiscoverHost as MDDiscoverHost,
|
|
|
|
DiscoverPort as MDDiscoverPort,
|
|
|
|
DiscoverService as MDDiscoverService,
|
2018-04-06 11:02:18 +00:00
|
|
|
Zone,
|
|
|
|
Host,
|
|
|
|
Port,
|
|
|
|
Service,
|
2018-05-02 07:23:35 +00:00
|
|
|
} from '@overflow/commons-typescript/model/discovery';
|
|
|
|
import { Probe } from '@overflow/commons-typescript/model/probe';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class TargetDiscoveryService {
|
|
|
|
|
|
|
|
public constructor(
|
|
|
|
private rpcService: RPCService,
|
|
|
|
) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public saveAllTarget(hosts: Host[], probe: Probe): Observable<Boolean> {
|
|
|
|
|
|
|
|
return this.rpcService.call('TargetDiscoveryService.saveAllTarget', hosts, probe);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|