@yorkie-js/sdk
    Preparing search index...

    Interface ClientOptions

    ClientOptions are user-settable options used when defining clients.

    interface ClientOptions {
        apiKey?: string;
        authTokenInjector?: (reason?: string) => Promise<string>;
        channelHeartbeatInterval?: number;
        key?: string;
        metadata?: Record<string, string>;
        reconnectStreamDelay?: number;
        retrySyncLoopDelay?: number;
        rpcAddr?: string;
        syncLoopDuration?: number;
        userAgent?: string;
    }
    Index

    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.

    authTokenInjector?: (reason?: string) => Promise<string>

    authTokenInjector is a function that provides a token for the auth webhook. When the webhook response status code is 401, this function is called to refresh the token. The reason parameter is the reason from the webhook response.

    channelHeartbeatInterval?: number

    channelHeartbeatInterval is the interval of the channel heartbeat. The client sends a heartbeat to the server to refresh the channel TTL. The default value is 30000(ms).

    key?: string

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

    metadata?: Record<string, string>

    metadata is the metadata of the client. It is used to store additional information about the client.

    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).

    rpcAddr?: string

    rpcAddr is the address of the RPC server. It is used to connect to the server.

    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).

    userAgent?: string

    userAgent is the user agent of the client. It is used to identify the client.