require Logger
server = %Etcd.Connection{
hosts: ["127.0.0.1:4001"],
ssl_options: [
{:certfile, 'etcd_client.crt'},
{:keyfile, 'etcd_client.key'},
]
}
{:ok,conn} = Etcd.Connection.start_link server
#IO.inspect Etcd.Connection.request(server,:get,"/test/foobar/xx/yy")
IO.inspect Etcd.get? conn,"/test"
IO.inspect Etcd.put! conn,"/test","hello world"
IO.inspect Etcd.put! conn,"/test","hello", [prevValue: "hello world"]
IO.inspect Etcd.delete! conn,"/test"
IO.inspect Etcd.put! conn,"/test","hello world", ttl: 10
IO.inspect Etcd.put! conn,"/foo/bar/test","hello world", ttl: 3
for x <- Etcd.ls!(conn,"/", true, true, true) ,do: IO.inspect x.key
IO.inspect Etcd.wait! conn,"/",recursive: true
-
Notifications
You must be signed in to change notification settings - Fork 5
Etcd client in Elixir
License
bearice/elixir-etcd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Etcd client in Elixir
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published