View Source Ravix.Connection.ServerNode (ravix v0.2.2)

State of a RavenDB connection executor node

- store: Atom of the RavenDB Store, E.g: Ravix.Test.Store
- url: URL of this node
- port: port of this node
- conn: TCP Connection State
- ssl_config: User SSL certificate config for this node
- requests: Currently executing request calls to RavenDB
- protocol: http or https
- database: For which database is this executor
- cluster_tag: Tag of this node in the RavenDB cluster
- healthcheck_every: Checks the node health every x seconds
- opts: General node Options

Link to this section Summary

Functions

Create a new node state based on the RavenDB Topology response

Creates a new node state from the url, database name and ssl certificate

Helper method to build the url for Database specific API requests

Link to this section Types

@type t() :: %Ravix.Connection.ServerNode{
  cluster_tag: String.t() | nil,
  conn: Mint.HTTP.t() | nil,
  database: String.t(),
  healthcheck_every: non_neg_integer(),
  opts: keyword(),
  port: non_neg_integer(),
  protocol: atom(),
  requests: map(),
  ssl_config: Keyword.t() | nil,
  state: :healthy | :unhealthy | :initializing,
  store: atom(),
  url: String.t()
}

Link to this section Functions

Link to this function

from_api_response(node_response)

View Source
@spec from_api_response(map()) :: t()

Create a new node state based on the RavenDB Topology response

@spec from_url(binary() | URI.t(), Ravix.Connection.State.t()) :: t()

Creates a new node state from the url, database name and ssl certificate

@spec node_url(t()) :: String.t()

Helper method to build the url for Database specific API requests

@spec retry_on_stale?(t()) :: boolean()