Arangox.VelocyClient (Arangox v0.8.0)

Copy Markdown View Source

The VelocyStream client, an explicit opt-in for ArangoDB 3.11 deployments (client: Arangox.VelocyClient) — the server removed the protocol in 3.12, and Arangox.MintClient over HTTP is the default.

Conforms to the Arangox.Client error contract: every failure is an Arangox.Error carrying a :reason atom, and neither connect/2 nor request/3 raises or exits, whatever the transport does with the options it is given.

VelocyStream carries headers as a map in both directions, so this client cannot express a repeated header name. Outbound, it builds the map from the merged list itself: the right-most occurrence of a name wins and the others are dropped. Inbound, the list on Arangox.Response is built from the server's map: no repeated name can arrive, and the order is the map's key order, not the order the server wrote them. Casing is preserved in both directions — unlike the HTTP clients, which lowercase names.

URI query parsing functions proudly stolen from Plataformatec and licensed under Apache 2.0.

Summary

Functions

vst_maxsize() deprecated

Returns the VelocyStream chunk size from the deprecated application config, or 30_720.

Functions

maybe_authenticate(state, opts \\ [])

@spec maybe_authenticate(Arangox.Connection.t(), [Arangox.Client.request_option()]) ::
  :ok | {:error, Arangox.Error.t()}

vst_maxsize()

This function is deprecated. Pass :vst_maxsize to Arangox.start_link/1 instead.
@spec vst_maxsize() :: pos_integer()

Returns the VelocyStream chunk size from the deprecated application config, or 30_720.

Deprecated in 0.8 and removed in the next release, along with the application-config read it reports on. It returns the fallback, not what any particular pool uses: since 0.8 the chunk size is a per-pool start option, resolved at connect and held in Arangox.Connection, so two pools can disagree and neither has to agree with this. Pass :vst_maxsize to Arangox.start_link/1 instead.

Emits a deprecation warning on every call.