Replica
A class for creating replicated objects.
Replica.Server is used on the server to create and manage replicated objects. Replica.Client is used on the client to receive replicated objects.
Install with wally by adding the following to your wally.toml
:
Replica = "dig1t/replica@1.0.4"
Types
Action
interface
Action {
type:
string
--
The type of the action
payload:
any
--
The data of the action
}
ReplicaTypes
interface
ReplicaTypes {
replicaId:
string
--
The unique identifier for the replica
class:
string
--
The class of the replica
key:
string
--
The key of the data that was changed
value:
any
--
The new value of the data (Set to nil or leave empty to remove the key)
}
Data
type
Data =
{
[
string
]
:
any
}
Properties
Server
Replica.Server:
ReplicaServer
Client
Replica.Client:
ReplicaClient