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

This process handles messages for yjs protocol sync and awareness. https://github.com/yjs/y-protocols

Persistence is supported by passing persistence module. see Yex.Sync.SharedDoc.PersistenceBehaviour

If the observer process does not exist, it will automatically terminate.

Summary

Types

@type launch_param() ::
  {:doc_name, String.t()}
  | {:persistence, {module() | {module(), init_arg :: term()}}}
  | {:auto_exit, boolean()}

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