Dex TypeScript SDK 1.32.0
    Preparing search index...

    Interface RPCOptions<Input, Output>

    Configures an RPC decorator's name, codecs, timeout, and Attribute locks.

    interface RPCOptions<Input = unknown, Output = unknown> {
        inputCodec?: Codec<Input>;
        isTransactional?: boolean;
        loadAttributeMapInstances?: readonly AttributeMapLoad[];
        loadAttributeMaps?: readonly AttributeMap<unknown>[];
        loadChannelMapInstances?: readonly ChannelMapLoad[];
        loadChannelMaps?: readonly ChannelMap<unknown>[];
        loadChannels?: readonly Channel<unknown>[];
        lockAttributes?: readonly AttributeLock[];
        name?: string;
        outputCodec?: Codec<Output>;
        timeoutMs?: number;
    }

    Type Parameters

    • Input = unknown

      Handler input type.

    • Output = unknown

      Handler output type.

    Index

    Properties

    inputCodec?: Codec<Input>

    Input codec. Omit this for JSON objects, or when the handler has no input. Scalar wire kinds still need an explicit codec.

    isTransactional?: boolean

    Requests transactional reads and writes even when no Attribute lock is configured.

    loadAttributeMapInstances?: readonly AttributeMapLoad[]

    Exact AttributeMap instances included in the RPC snapshot.

    loadAttributeMaps?: readonly AttributeMap<unknown>[]

    AttributeMaps whose current instances are included in the RPC snapshot.

    loadChannelMapInstances?: readonly ChannelMapLoad[]

    Exact ChannelMap instance messages included in the RPC snapshot.

    loadChannelMaps?: readonly ChannelMap<unknown>[]

    ChannelMaps whose current instance messages are included in the RPC snapshot.

    loadChannels?: readonly Channel<unknown>[]

    Singleton Channel pending messages included in the RPC snapshot.

    lockAttributes?: readonly AttributeLock[]

    Attribute locks held for the entire invocation.

    name?: string

    Protocol RPC name; uses the decorated method name when omitted.

    outputCodec?: Codec<Output>

    Output codec. Omit this for JSON objects, or when the handler returns void. Scalar wire kinds still need an explicit codec.

    timeoutMs?: number

    Non-negative handler timeout in milliseconds.