View Source Yex.Managed.SharedDoc (y_ex v0.5.0)

This module is experimental

Automatically synchronized document processes within the same process group. This is synchronized cluster-wide.

Note: this uses :pg.monitor and requires OTP 25.1 or higher.

vs Yex.Sync.SharedDoc Because a copy is maintained for each cluster, the amount of communication between clusters may be reduced, but memory usage will increase.

Summary

Types

@type launch_param() ::
  {:doc_name, String.t()}
  | {:persistence, {module() | {module(), init_arg :: term()}}}
  | {:idle_timeout, integer()}
  | {:pg_scope, atom()}
  | {:local_pubsub, module()}

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

send_yjs_message(server, message)

View Source
Link to this function

start(param, option \\ [])

View Source
@spec start(param :: [launch_param()], option :: GenServer.options()) ::
  GenServer.on_start()
Link to this function

start_link(param, option \\ [])

View Source
@spec start_link(param :: [launch_param()], option :: GenServer.options()) ::
  GenServer.on_start()
Link to this function

start_sync(server, step1_message)

View Source