UNPKG

dasf-messaging-typescript

Version:

Typescript RPC bindings for the data analytics software framework (DASF)

55 lines (54 loc) 1.73 kB
/** * Interface providing DASF connection urls and parameters */ export interface DASFUrlBuilder { /** * Which topic is used? */ topic: string; /** * The topic on that the consumer listens. * Needed to get the results for the backend module. */ consumeTopic: string; /** * A url that allows to create a consumer with the DASF * web socket api: * * A url can look similar to this: * ws://%host%:%port%/ws/v2/%type%/non-persistent/public/digital-earth/%topic%/%subscription% * * with type = 'consumer' * and topic = consumeTopic * */ DASFConsumerURL: string; /** See DASFConsumerURL for an explanation. */ DASFProducerURL: string; } declare enum Type { producer = "producer", consumer = "consumer" } /** * Default url builder implementation based on host:port, namespace and topic */ export declare class DefaultDASFUrlBuilder implements DASFUrlBuilder { private static readonly BASE_DASF_URL; readonly topic: string; readonly consumeTopic: string; readonly DASFConsumerURL: string; readonly DASFProducerURL: string; constructor(host: string, port: string, namespace: string, topic: string); protected buildUrl(host: string, port: string, namespace: string, type: Type, topic: string): string; protected generateConsumeTopic(topic: string): string; protected generateSubscriptionPrefix(): string; protected generateRequestToken(): string; } export declare class DigitalEarthUrlBuilder extends DefaultDASFUrlBuilder { private static readonly HOST; private static readonly PORT; private static readonly NAMESPACE; constructor(topic: string); } export {};