32 lines
747 B
TypeScript
32 lines
747 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { RPCService } from '@loafer/ng-rpc';
|
|
import {
|
|
DiscoveryStartInfo,
|
|
DiscoverZone as MDDiscoverZone,
|
|
DiscoverHost as MDDiscoverHost,
|
|
DiscoverPort as MDDiscoverPort,
|
|
DiscoverService as MDDiscoverService,
|
|
Zone,
|
|
Host,
|
|
Port,
|
|
Service,
|
|
} from '@overflow/commons-typescript/model/discovery';
|
|
import { Probe } from '@overflow/commons-typescript/model/probe';
|
|
|
|
@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);
|
|
}
|
|
|
|
}
|