View Source Spawn.Cluster.StateHandoff.InvocationSchedulerState (spawn v2.0.0-RC10)

This handles invocation scheduler stream

It uses the DeltaCrdt library to handle a distributed state, which is an eventually consistent replicated data type. The module starts a GenServer that monitors nodes in the cluster, and when a new node comes up it sends a "set_neighbours" message to that node's GenServer process with its own DeltaCrdt process ID. This is done to ensure that changes in either node's state are reflected across both.

Summary

Functions

all()

@spec all() :: map()

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get(invocation)

get_crdt_pid()

put(invocation, scheduled_to, repeat_in)

put_many(invocations)

remove(key)

start_link(opts)