ESClient v1.0.0 ESClient.Driver behaviour View Source
A behavior that must be implemented by custom Elasticsearch drivers. A driver sends a request to the Elasticsearch endpoint and retrieves the particular response.
Link to this section Summary
Types
A type representing failed response data.
A type representing request headers.
A type representing successful response data.
A type representing response headers.
Callbacks
A callback for implementing an own function to send a request to a HTTP endpoint.
Link to this section Types
A type representing failed response data.
A type representing request headers.
Link to this type
resp()
View Sourceresp() :: %{ :status_code => non_neg_integer(), :headers => resp_headers(), :body => binary(), optional(atom()) => any() }
A type representing successful response data.
A type representing response headers.
Link to this section Callbacks
Link to this callback
request(verb, url, body, headers, opts)
View Sourcerequest( verb :: ESClient.verb(), url :: URI.t(), body :: binary(), headers :: req_headers(), opts :: Keyword.t() ) :: {:ok, resp()} | {:error, error()}
A callback for implementing an own function to send a request to a HTTP endpoint.