@sovereignbase/actor-channel
    Preparing search index...

    Type Alias ChannelBrokerEventMap<RPCRequest, RPCResponse, Topic>

    Maps each event dispatched by ChannelBroker to its payload.

    type ChannelBrokerEventMap<RPCRequest, RPCResponse, Topic = string> = {
        attachment: {
            attachment: ChannelAttachment<Topic>;
            owner: ActorChannelPair;
        };
        request: [
            request: RPCRequest,
            respond: (response: RPCResponse) => void,
            sender: ActorChannelPair,
        ];
        violation: {
            description:
                | "Wrong message encoding."
                | "Off protocol."
                | "Unauthorized.";
            violator: ActorChannelPair;
        };
    }

    Type Parameters

    • RPCRequest

      The RPC request payload type.

    • RPCResponse

      The RPC response payload type.

    • Topic = string

      The topic identifier type.

    Index
    attachment: { attachment: ChannelAttachment<Topic>; owner: ActorChannelPair }

    A channel whose attachment changed and the attachment's new state.

    request: [
        request: RPCRequest,
        respond: (response: RPCResponse) => void,
        sender: ActorChannelPair,
    ]

    An RPC request, its response callback, and the channel that sent it.

    violation: {
        description:
            | "Wrong message encoding."
            | "Off protocol."
            | "Unauthorized.";
        violator: ActorChannelPair;
    }

    A protocol violation description.