Arangox.Endpoint (Arangox v0.5.5) 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
Specs
addr() :: {:unix, path :: binary()} | {:tcp, host :: binary(), port :: non_neg_integer()}
Specs
Link to this section Functions
Specs
new(Arangox.endpoint()) :: %Arangox.Endpoint{addr: addr(), ssl?: boolean()}
Parses an endpoint and returns an %Arangox.Endpoint{}
struct.