1.0.3 • Published 6 months ago

@types/vertx__eventbus-bridge-client.js v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/vertx__eventbus-bridge-client.js

Summary

This package contains type definitions for @vertx/eventbus-bridge-client.js (http://vertx.io).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vertx__eventbus-bridge-client.js.

index.d.ts

// Type definitions for @vertx/eventbus-bridge-client.js 1.0
// Project: http://vertx.io
// Definitions by: Chiramet Phong Penglerd <https://github.com/Phong6698>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace EventBus {
    type EventBusStatic = new(url: string, options?: any) => EventBus;

    interface EventBus {
        url: string;
        options?: EventBusOptions | undefined;
        onopen(): void;
        onerror(error: EventBusError): void;
        onclose(): void;
        registerHandler(address: string, headers?: object, callback?: (error: Error, message: any) => void): void;
        unregisterHandler(address: string, headers?: object, callback?: (error: Error, message: any) => void): void;
        send(address: string, message: any, headers?: object, callback?: (error: Error, message: any) => void): void;
        publish(address: string, message: any, headers?: any): void;
        enableReconnect(enable: boolean): void;
        enablePing(enable: boolean): void;
        close(): void;
    }

    interface EventBusOptions {
        vertxbus_reconnect_attempts_max: number; // Max reconnect attempts
        vertxbus_reconnect_delay_min: number; // Initial delay (in ms) before first reconnect attempt
        vertxbus_reconnect_delay_max: number; // Max delay (in ms) between reconnect attempts
        vertxbus_reconnect_exponent: number; // Exponential backoff factor
        vertxbus_randomization_factor: number; // Randomization factor between 0 and 1
    }

    interface EventBusError {
        body: string;
        type: string;
    }
}

declare var EventBus: EventBus.EventBusStatic;
export = EventBus;

Additional Details

  • Last updated: Fri, 02 Jul 2021 18:05:02 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Chiramet Phong Penglerd.

1.0.2

7 months ago

1.0.3

6 months ago

1.0.1

3 years ago

1.0.0

3 years ago