package config
- Alphabetic
- Public
- Protected
Type Members
- case class AgentSegment(value: String, version: Option[String] = None) extends Product with Serializable
Represents a segment of algolia agent header.
Represents a segment of algolia agent header.
- value
segment string value
- version
optional version
- sealed trait CallType extends AnyRef
Indicate whether the HTTP call performed is of type read (GET) or write (POST, PUT ..).
Indicate whether the HTTP call performed is of type read (GET) or write (POST, PUT ..). Used to determine which timeout duration to use.
- trait ClientConfig extends AnyRef
- case class ClientOptions(agentSegments: Seq[AgentSegment] = Seq.empty, hosts: Seq[Host] = Seq.empty, connectTimeout: Duration = Duration(2, TimeUnit.SECONDS), writeTimeout: Duration = Duration(30, TimeUnit.SECONDS), readTimeout: Duration = Duration(5, TimeUnit.SECONDS), defaultHeaders: Map[String, String] = Map.empty, compressionType: CompressionType = CompressionType.None, logging: Option[Logging] = None, customFormats: Option[Formats] = None, requesterConfig: Option[Function1[Builder, _]] = None, customRequester: Option[Requester] = None) extends ClientConfig with Product with Serializable
Represents the configuration of an API client.
Represents the configuration of an API client.
- agentSegments
segments to add to the Algolia agent header
- hosts
hosts to use for requests
- connectTimeout
connection timeout
- writeTimeout
write timeout
- readTimeout
read timeout
- defaultHeaders
default headers to add to requests
- compressionType
compression type to use for requests
- logging
logging configuration
- customFormats
custom JSON formats
- requesterConfig
configuration for the HTTP requester
- customRequester
custom HTTP requester
- sealed trait CompressionType extends AnyRef
Compression type used for HTTP requests.
- case class Host(url: String, callTypes: Set[CallType], scheme: String = "https", port: Option[Int] = None) extends Product with Serializable
Represents an Algolia host.
Represents an Algolia host.
- url
Host url
- callTypes
Whether this host should be used for read and/or write requests.
- scheme
Host protocol (i.e.
http
,https
)- port
Host port
- case class HttpRequest(method: String, path: String, read: Boolean = false, headers: Map[String, String] = Map.empty, queryParameters: Map[String, String] = Map.empty, body: Option[Any] = None) extends Product with Serializable
Represents an HTTP request.
Represents an HTTP request.
- method
HTTP method
- path
HTTP path
- read
Whether this request is a read request
- headers
HTTP headers
- queryParameters
HTTP query parameters
- body
HTTP body
- sealed trait LogLevel extends AnyRef
Log level used for HTTP requests.
- trait Logger extends AnyRef
Logger interface.
- case class Logging(level: LogLevel, logger: Logger) extends Product with Serializable
Logger configuration.
Logger configuration.
- level
Log level.
- logger
Logger.
- case class RequestOptions(headers: Map[String, String] = Map.empty, queryParameters: Map[String, String] = Map.empty, readTimeout: Option[Duration] = None, writeTimeout: Option[Duration] = None) extends Product with Serializable
RequestOptions are used to pass extra parameters, headers, and timeouts to the request.
RequestOptions are used to pass extra parameters, headers, and timeouts to the request. Parameters set in the request option will override the default parameter.
- headers
HTTP headers
- queryParameters
HTTP query parameters
- readTimeout
HTTP read timeout
- writeTimeout
HTTP write timeout
- trait Requester extends AutoCloseable
Represents a mechanism for executing HTTP requests and deserializing responses using JSON4S.
Represents a mechanism for executing HTTP requests and deserializing responses using JSON4S. It provides methods for making requests and returning the desired object representation. Implementations of this trait should ensure proper resource management.
Value Members
- object AgentSegment extends Serializable
- object CallType
Companion object of CallType.
- object ClientOptions extends Serializable
- object CompressionType
Companion object of CompressionType.
- object HttpRequest extends Serializable
- object LogLevel
Companion object of LogLevel.
- object Logger
- object Logging extends Serializable
- object RequestOptions extends Serializable