Arangox v0.4.2 Arangox.Endpoint View Source

Utilities for parsing ArangoDB endpoints.

iex> Endpoint.new("http://localhost:8529")
%Arangox.Endpoint{addr: {:tcp, "localhost", 8529}, ssl?: false}

iex> Endpoint.new("https://localhost:8529")
%Arangox.Endpoint{addr: {:tcp, "localhost", 8529}, ssl?: true}

iex> Endpoint.new("http://unix:/tmp/arangodb.sock")
%Arangox.Endpoint{addr: {:unix, "/tmp/arangodb.sock"}, ssl?: false}

Link to this section Summary

Functions

Parses an endpoint and returns an %Arangox.Endpoint{} struct.

Link to this section Types

Link to this type

addr()

View Source
addr() ::
  {:unix, path :: binary()}
  | {:tcp, host :: binary(), port :: non_neg_integer()}
Link to this type

t()

View Source
t() :: %Arangox.Endpoint{addr: addr(), ssl?: boolean()}

Link to this section Functions

Link to this function

new(endpoint)

View Source
new(Arangox.endpoint()) :: %Arangox.Endpoint{addr: addr(), ssl?: boolean()}

Parses an endpoint and returns an %Arangox.Endpoint{} struct.