@hpcc-js/comms
Version:
hpcc-js - Communications
44 lines (43 loc) • 2.27 kB
TypeScript
import { Cache, StateObject } from "@hpcc-js/util";
import { IConnection, IOptions } from "../connection";
import { WsMachine, WsMachineEx, MachineService } from "../services/wsMachine";
import { TopologyService, WsTopology } from "../services/wsTopology";
import { Machine } from "./machine";
export declare class TargetClusterCache extends Cache<{
BaseUrl: string;
Name: string;
}, TargetCluster> {
constructor();
}
export interface TpTargetClusterEx {
MachineInfoEx: WsMachine.MachineInfoEx[];
}
export type UTargetClusterState = WsTopology.TpTargetCluster & WsTopology.TpClusterNameType & TpTargetClusterEx;
export type ITargetClusterState = WsTopology.TpTargetCluster | WsTopology.TpClusterNameType | TpTargetClusterEx;
export declare class TargetCluster extends StateObject<UTargetClusterState, ITargetClusterState> implements UTargetClusterState {
protected connection: TopologyService;
protected machineConnection: MachineService;
readonly BaseUrl: string;
readonly Name: string;
readonly Prefix: string;
readonly Type: string;
readonly IsDefault: boolean;
readonly TpClusters: WsTopology.TpClusters;
readonly TpEclCCServers: WsTopology.TpEclCCServers;
readonly TpEclServers: WsTopology.TpEclServers;
readonly TpEclAgents: WsTopology.TpEclAgents;
readonly TpEclSchedulers: WsTopology.TpEclSchedulers;
readonly MachineInfoEx: WsMachine.MachineInfoEx[];
readonly CMachineInfoEx: Machine[];
static attach(optsConnection: IOptions | IConnection | TopologyService, name: string, state?: ITargetClusterState): TargetCluster;
protected constructor(optsConnection: IOptions | IConnection | TopologyService, name: string);
fetchMachines(request?: WsMachine.GetTargetClusterInfoRequest): Promise<Machine[]>;
machineStats(): {
maxDisk: number;
meanDisk: number;
};
fetchUsage(): Promise<WsMachineEx.TargetClusterUsage[]>;
}
export declare function targetClusters(optsConnection: IOptions | IConnection | TopologyService): Promise<TargetCluster[]>;
export declare function defaultTargetCluster(optsConnection: IOptions | IConnection | TopologyService): Promise<TargetCluster>;
//# sourceMappingURL=targetCluster.d.ts.map