tnsr-client
Version:
TypeScript API client for Netgate TNSR network routers with RESTCONF support
22 lines • 740 B
TypeScript
import { TNSRClient, InterfaceTrafficStats } from '.';
export declare function createTnsrClient(config?: {
url?: string;
username?: string;
password?: string;
}): TNSRClient;
export declare function formatTrafficStats(stats: InterfaceTrafficStats[]): string;
export declare function formatBytes(bytes: number): string;
export declare function validateConfig(config: {
url: string;
username: string;
password: string;
}): {
valid: boolean;
errors: string[];
};
export declare function createTrafficMonitor(client: TNSRClient, intervalMs?: number): {
start: () => void;
stop: () => void;
onUpdate: (callback: (stats: InterfaceTrafficStats[]) => void) => void;
};
//# sourceMappingURL=utils.d.ts.map