@univerjsrpcReadme

@univerjs/rpc v0.5.0-beta.1Docs


@univerjs/rpc

Classes

ClassDescription
ChannelClientThis method provides implementation for IChannel and is responsible for transforming a local calling to a RPC calling.
ChannelServer-
ChannelServiceThis service is responsible for managing the RPC channels.
DataSyncPrimaryControllerThis controller is responsible for syncing data from the primary thread to the worker thread.
DataSyncReplicaControllerThis controller is responsible for syncing data from the worker thread to the primary thread.
RemoteSyncPrimaryService-
UniverRPCMainThreadPluginThis plugin is used to register the RPC services on the main thread. It is also responsible for booting up the Web Worker instance of Univer.
UniverRPCWorkerThreadPluginThis plugin is used to register the RPC services on the worker thread.
WebWorkerRemoteInstanceService-

Interfaces

InterfaceDescription
IMessageProtocolThis protocol is for transferring data from the two peer univer instance running in different locations.
IRemoteInstanceService-
IRemoteSyncService-
IRPCChannelService-
IUniverRPCMainThreadConfig-
IUniverRPCWorkerThreadConfig-

Variables

VariableDescription
RemoteInstanceServiceName-
RemoteSyncServiceName-

Functions

FunctionDescription
fromModuleWrapper a service or a controller into a channel so it could be invoked by a remote client. When the protocol is called, it would forward to the underlying service or controller.
IRemoteInstanceServiceThis service is provided by the replica Univer.
IRemoteSyncServiceThis service is provided by the primary Univer.
IRPCChannelService-
toModuleWrap a channel into a service or a controller so it could be invoked by the upper layer modules. When the service or controller is called, it would request the remote server by calling the channel.