Skip to content

TrsNium/tick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tick

tick is a library for vector clock. If you have a request, please make an issue.

usage

# define your processing.
defmodule Tick.Example do
  use Tick.StateMachine

  def increment(n) do
    tick do
      n + 1
    end
  end
end

# make a config to send other nodes.
config = Tick.Config.new(:my_name, [{:my_name, nil}, {:other_node_name, :other_node_name@address}])
# get a spec to generate supervisor
spec = Tick.Example.child_spec(config)
Supervisor.start_link([spec], strategy: :one_for_one)

# execute block inside `tick`, and send message other nodes.
Tick.Example.increment(0)

Installation

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

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

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

About

vector clock implemented with elixir

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages