mirror of
https://github.com/fluencelabs/registry-demo
synced 2025-04-24 16:02:12 +00:00
40 lines
1.8 KiB
TypeScript
40 lines
1.8 KiB
TypeScript
/**
|
|
*
|
|
* This file is auto-generated. Do not edit manually: changes may be erased.
|
|
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
|
|
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
|
|
* Aqua version: 0.6.1-279
|
|
*
|
|
*/
|
|
import { FluencePeer } from '@fluencelabs/fluence';
|
|
import { CallParams } from '@fluencelabs/fluence/dist/internal/compilerSupport/v2';
|
|
export interface DiscoveryServiceDef {
|
|
notify_discovered: (route_id: string, userName: string, callParams: CallParams<'route_id' | 'userName'>) => {
|
|
route: string;
|
|
userName: string;
|
|
}[] | Promise<{
|
|
route: string;
|
|
userName: string;
|
|
}[]>;
|
|
}
|
|
export declare function registerDiscoveryService(service: DiscoveryServiceDef): void;
|
|
export declare function registerDiscoveryService(serviceId: string, service: DiscoveryServiceDef): void;
|
|
export declare function registerDiscoveryService(peer: FluencePeer, service: DiscoveryServiceDef): void;
|
|
export declare function registerDiscoveryService(peer: FluencePeer, serviceId: string, service: DiscoveryServiceDef): void;
|
|
export declare function createMyRoute(label: string, userName: string, config?: {
|
|
ttl?: number;
|
|
}): Promise<string>;
|
|
export declare function createMyRoute(peer: FluencePeer, label: string, userName: string, config?: {
|
|
ttl?: number;
|
|
}): Promise<string>;
|
|
export declare type DiscoverAndNotifyResult = [string, {
|
|
route: string;
|
|
userName: string;
|
|
}[]];
|
|
export declare function discoverAndNotify(join_route_id: string, label: string, userName: string, config?: {
|
|
ttl?: number;
|
|
}): Promise<DiscoverAndNotifyResult>;
|
|
export declare function discoverAndNotify(peer: FluencePeer, join_route_id: string, label: string, userName: string, config?: {
|
|
ttl?: number;
|
|
}): Promise<DiscoverAndNotifyResult>;
|