UNPKG

sdg-rpc

Version:

pomelo ts rpc

20 lines (19 loc) 492 B
import { IRpcServerInfo } from '..'; export declare class ConsistentHash { ring: { [key: string]: any; }; keys: { [key: string]: any; }; nodes: IRpcServerInfo[]; opts: any; replicas: number; algorithm: string; station: any; constructor(nodes: IRpcServerInfo[], opts: any); addNode(node: IRpcServerInfo): void; removeNode(node: IRpcServerInfo): void; getNode(key: string): any; getNodePosition(result: string): number; }