@hpcc-js/comms
Version:
hpcc-js - Communications
43 lines (42 loc) • 2.16 kB
TypeScript
import { Cache, StateObject } from "@hpcc-js/util";
import { IConnection, IOptions } from "../connection.ts";
import { WsMachine, WsMachineEx, MachineService } from "../services/wsMachine.ts";
import { TopologyService, WsTopology } from "../services/wsTopology.ts";
import { Machine } from "./machine.ts";
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;
get BaseUrl(): string;
get Name(): string;
get Prefix(): string;
get Type(): string;
get IsDefault(): boolean;
get TpClusters(): WsTopology.TpClusters;
get TpEclCCServers(): WsTopology.TpEclCCServers;
get TpEclServers(): WsTopology.TpEclServers;
get TpEclAgents(): WsTopology.TpEclAgents;
get TpEclSchedulers(): WsTopology.TpEclSchedulers;
get MachineInfoEx(): WsMachine.MachineInfoEx[];
get 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>;