Skip to content

simplebet/hlclock_synchronizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HLClockSynchronizer

A GenServer that syncs HLClock timestamps between nodes using Phoenix.Pubsub.

Note that in order for this to work, you must cluster your nodes using something like libcluster and for PubSub to be running in distribute mode.

Installation

If available in Hex, the package can be installed by adding hlcid_synchronizer to your list of dependencies in mix.exs:

def deps do
  [
    {:hlclock_synchronizer, "~> 0.1.0"}
  ]
end

Usage

# In your supervision tree, add this as a child spec
# Note that you can use any HLClock clock, here I use HLCID.Clock

{HLClockSynchronizer, pubsub: MyApp.PubSub, clock: HLCID.Clock}

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/hlcid_synchronizer.

About

A GenServer that syncs HLClock timestamps between nodes using Phoenix.Pubsub.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages