member_webapp/@overflow/probe/service/probe-host.service.ts
crusader 561d2b7180 ing
2018-06-14 13:38:51 +09:00

30 lines
843 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RPCService } from '@loafer/ng-rpc';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Domain } from '@overflow/commons-typescript/model/domain';
@Injectable()
export class ProbeHostService {
public constructor(
private rpcService: RPCService,
) {
}
public read(id: number): Observable<ProbeHost> {
return this.rpcService.call<ProbeHost>('ProbeHostService.read', id);
}
public readByProbeID(probeID: number): Observable<Probe> {
return this.rpcService.call<ProbeHost>('ProbeHostService.readByProbeID', probeID);
}
public readAllByDomainID(domainID: number): Observable<ProbeHost[]> {
return this.rpcService.call<ProbeHost[]>('ProbeHostService.readAllByDomainID', domainID);
}
}