View Source EtcdEx.Mint (EtcdEx v1.3.0)

This module provides interface to Etcd cluster on top of Mint.

Link to this section Summary

Link to this section Types

@opaque t()

Link to this section Functions

Link to this function

add_member(env, peer_urls, learner?)

View Source
Link to this function

cancel_watch(env, request_ref, watch_id)

View Source
@spec cancel_watch(t(), Mint.Types.request_ref(), EtcdEx.Types.watch_id()) ::
  {:ok, t()} | {:error, t(), Mint.Types.error()}
Link to this function

close_watch_stream(env, request_ref)

View Source
@spec close_watch_stream(t(), Mint.Types.request_ref()) ::
  {:ok, t()} | {:error, t(), Mint.Types.error()}
Link to this function

compact(env, revision, physical?)

View Source
@spec compact(t(), EtcdEx.Types.revision(), physical? :: boolean()) ::
  {:ok, t(), Mint.Types.request_ref()} | {:error, t(), Mint.Types.error()}
Link to this function

delete(env, key, opts \\ [])

View Source
@spec delete(t(), EtcdEx.Types.key(), [EtcdEx.Types.delete_opt()]) ::
  {:ok, t()} | {:error, t(), Mint.Types.error()}

Delete key-value pair from Etcd.

Link to this function

get(env, key, opts \\ [])

View Source
@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.

Link to this function

grant(env, ttl, lease_id \\ 0)

View Source
Link to this function

keep_alive(env, lease_id)

View Source
@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()}
Link to this function

lock(env, name, lease_id)

View Source
@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.

Link to this function

promote_member(env, member_id)

View Source
Link to this function

put(env, key, value, opts \\ [])

View Source
@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.

Link to this function

remove_member(env, member_id)

View Source
@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.

Link to this function

ttl(env, lease_id, opts \\ [])

View Source
@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.

Link to this function

update_member(env, member_id, peer_urls)

View Source
Link to this function

watch(env, request_ref, key, opts \\ [])

View Source
@spec watch(t(), Mint.Types.request_ref(), EtcdEx.Types.key(), [
  EtcdEx.Types.watch_opt()
]) ::
  {:ok, t()} | {:error, t(), Mint.Types.error()}
@spec wrap(Mint.HTTP2.t()) :: t()

Wraps a Mint connection.