Current section
Files
Jump to
Current section
Files
README.md
# EtcdExElixir client for the etcd API v3 (gRPC based). All core features aresupported. It includes reconnection, transaction, software transactionalmemory, high-level query builders and lease management, watchers.## InstallationThe package can be installed by adding `etcdex` to your list of dependencies in`mix.exs`:```elixirdef deps do [ {:etcdex, "~> 1.0"} ]end```Documentation is available at [HexDocs](https://hexdocs.pm/etcdex).## UsageFirst, create a connection to your etcd cluster with:```elixirEtcdEx.start_link(name: MyApp.Etcd)```or add one to your supervision tree:```elixirSupervisor.start_link([ {EtcdEx, name: MyApp.Etcd}], strategy: :one_for_one)```Get a single key with:```elixirEtcdEx.get(MyApp.Etcd, "/foo")```or list all keys with `/foo` prefix using:```elixirEtcdEx.get(MyApp.Etcd, "/foo", prefix: true)```or list all keys after `/foo` using:```elixirEtcdEx.get(MyApp.Etcd, "/foo", from_key: true)```Check [the documentation](https://hexdocs.pm/etcdex) for other options.## TelemetryEtcdEx uses Telemetry to provide instrumentation. See the `EtcdEx.Telemetry`module for details on specific events.