Interface ClientOptions

ClientOptions are user-settable options used when defining clients.

interface ClientOptions {
    apiKey?: string;
    key?: string;
    reconnectStreamDelay?: number;
    retrySyncLoopDelay?: number;
    syncLoopDuration?: number;
    token?: string;
}

Properties

apiKey?: string

apiKey is the API key of the project. It is used to identify the project. If not set, API key of the default project is used.

key?: string

key is the client key. It is used to identify the client. If not set, a random key is generated.

reconnectStreamDelay?: number

reconnectStreamDelay is the delay of the reconnect stream. If the stream is disconnected, the client waits for the delay to reconnect the stream. The default value is 1000(ms).

retrySyncLoopDelay?: number

retrySyncLoopDelay is the delay of the retry sync loop. If the sync loop fails, the client waits for the delay to retry the sync loop. The default value is 1000(ms).

syncLoopDuration?: number

syncLoopDuration is the duration of the sync loop. After each sync loop, the client waits for the duration to next sync. The default value is 50(ms).

token?: string

token is the authentication token of this client. It is used to identify the user of the client.