View Source ExClockBoundClient
This is the elixir version of aws clock bound client, to communicate with this service.
Preparation
Make sure the service is running correctly.
Installation
By adding ex_clock_bound_client to your list of dependencies in mix.exs:
def deps do
[
{:ex_clock_bound_client, "~> 0.0.1"}
]
endUsage
Runtime Configurations
All configurations are runtime configuration, and have default values.
import Config
config :ex_clock_bound_client,
clock_bound_socket_path: "/run/clockboundd/clockboundd.sock",
client_socket_path: Path.expand("./client.sock"),
recv_timeout: 100, # socket recv timeout
frequency_error: 1 # Setting clock frequency to 1ppm to match chronyAPIs
There are 5 APIs in this library, and additional deviation/0 are added compared to the official client.
ExCloudBoundClient.now/0ExCloudBoundClient.timing/1ExCloudBoundClient.deviation/0ExCloudBoundClient.before?/1ExCloudBoundClient.after?/1
See t:ExClockBoundClient for details.
Todo
This application is just implement a happy path, all exceptions need to be considered.