View Source EtcdEx.Mint (EtcdEx v1.2.0)
This module provides interface to Etcd cluster on top of Mint
.
Link to this section Summary
Functions
Delete key-value pair from Etcd.
Retrieve range of key-value pairs from Etcd.
Renew the lease.
Opens a watch stream.
Put key-value pair into Etcd.
Streams the next batch of responses from the given message.
Unwraps a EtcdEx.Mint
connection.
Wraps a Mint
connection.
Link to this section Types
@opaque t()
Link to this section Functions
@spec cancel_watch(t(), Mint.Types.request_ref(), EtcdEx.Types.watch_id()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec close_watch_stream(t(), Mint.Types.request_ref()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec compact(t(), EtcdEx.Types.revision(), physical? :: boolean()) :: {:ok, t(), Mint.Types.request_ref()} | {:error, t(), Mint.Types.error()}
@spec delete(t(), EtcdEx.Types.key(), [EtcdEx.Types.delete_opt()]) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
Delete key-value pair from Etcd.
@spec get(t(), EtcdEx.Types.key(), [EtcdEx.Types.get_opt()]) :: {:ok, t(), Mint.Types.request_ref()} | {:error, t(), Mint.Types.error()}
Retrieve range of key-value pairs from Etcd.
@spec keep_alive(t(), EtcdEx.Types.lease_id()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
Renew the lease.
@spec leases(t()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec lock(t(), EtcdEx.Types.name(), EtcdEx.Types.lease_id()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec open_watch_stream(t()) :: {:ok, t(), Mint.Types.request_ref()} | {:error, t(), Mint.Types.error()}
Opens a watch stream.
@spec put(t(), EtcdEx.Types.key(), EtcdEx.Types.value(), [EtcdEx.Types.put_opt()]) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
Put key-value pair into Etcd.
@spec revoke(t(), EtcdEx.Types.lease_id()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec stream(t(), term()) :: {:ok, t(), [EtcdEx.Types.response()]} | {:error, t(), Mint.Types.error(), [EtcdEx.Types.response()]} | :unknown
Streams the next batch of responses from the given message.
@spec ttl(t(), EtcdEx.Types.lease_id(), [EtcdEx.Types.ttl_opt()]) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec unlock(t(), EtcdEx.Types.key()) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec unwrap(t()) :: Mint.HTTP.t()
Unwraps a EtcdEx.Mint
connection.
@spec watch(t(), Mint.Types.request_ref(), EtcdEx.Types.key(), [ EtcdEx.Types.watch_opt() ]) :: {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec wrap(Mint.HTTP.t()) :: t()
Wraps a Mint
connection.