member_webapp/@overflow/target/service/target.service.ts
2018-06-05 20:31:29 +09:00

27 lines
734 B
TypeScript

import { Injectable } from '@angular/core';
import { RPCService } from '@loafer/ng-rpc';
import { Observable } from 'rxjs';
import { Target } from '@overflow/commons-typescript/model/target';
import { Host, Service } from '@overflow/commons-typescript/model/discovery';
@Injectable()
export class TargetService {
public constructor(
private rpcService: RPCService,
) {
}
public registDiscoveredTargets(probeID: number, hosts: Host[], services: Service[]): Observable<Target> {
return this.rpcService.call('TargetService.registDiscoveredTargets', probeID, hosts, services);
}
public modify(target: Target): Observable<Target> {
return this.rpcService.call<Target>('TargetService.modify', target);
}
}