BlazeClientBuilder

sealed abstract class BlazeClientBuilder[F[_]] extends BlazeBackendBuilder[Client[F]] with BackendBuilder[F, Client[F]]

Configure and obtain a BlazeClient

Value Params
asynchronousChannelGroup

custom AsynchronousChannelGroup to use other than the system default

bufferSize

internal buffer size of the blaze client

channelOptions

custom socket options

checkEndpointIdentification

require endpoint identification for secure requests according to RFC 2818, Section 3.1. If the certificate presented does not match the hostname of the request, the request fails with a CertificateException. This setting does not affect checking the validity of the cert via the sslContext's trust managers.

chunkBufferMaxSize

Size of the buffer that is used when Content-Length header is not specified.

connectTimeout

Duration a connection attempt times out after

customDnsResolver

customDnsResolver to use other than the system default

executionContext

custom executionContext to run async computations.

idleTimeout

duration that a connection can wait without traffic being read or written before timeout

maxChunkSize

maximum size of chunked content chunks

maxConnectionsPerRequestKey

Map of RequestKey to number of max connections

maxHeaderLength

maximum length of headers

maxResponseLineSize

maximum length of the request line

maxTotalConnections

maximum connections the client will have at any specific time

maxWaitQueueLimit

maximum number requests waiting for a connection at any specific time

parserMode

lenient or strict parsing mode. The lenient mode will accept illegal chars but replaces them with � (0xFFFD)

requestTimeout

maximum duration from the submission of a request through reading the body before a timeout.

responseHeaderTimeout

duration between the submission of a request and the completion of the response header. Does not include time to read the response body.

scheduler

execution scheduler

sslContext

Some custom SSLContext, or None if the default SSL context is to be lazily instantiated.

userAgent

optional custom user agent header

Companion
object
trait BackendBuilder[F, Client[F]]
trait BlazeBackendBuilder[Client[F]]
class Object
trait Matchable
class Any

Type members

Types

Value members

Concrete methods

def resource: Resource[F, Client[F]]
def withAsynchronousChannelGroup(asynchronousChannelGroup: AsynchronousChannelGroup): BlazeClientBuilder[F]
def withAsynchronousChannelGroupOption(asynchronousChannelGroup: Option[AsynchronousChannelGroup]): BlazeClientBuilder[F]
def withBufferSize(bufferSize: Int): BlazeClientBuilder[F]
def withChannelOptions(channelOptions: ChannelOptions): BlazeClientBuilder[F]
def withCheckEndpointAuthentication(checkEndpointIdentification: Boolean): BlazeClientBuilder[F]
def withChunkBufferMaxSize(chunkBufferMaxSize: Int): BlazeClientBuilder[F]
def withConnectTimeout(connectTimeout: Duration): BlazeClientBuilder[F]
def withCustomDnsResolver(customDnsResolver: RequestKey => Either[Throwable, InetSocketAddress]): BlazeClientBuilder[F]

Use an SSLContext obtained by SSLContext.getDefault() when making secure calls.

Use an SSLContext obtained by SSLContext.getDefault() when making secure calls.

Since 0.21, the creation is not deferred.

def withExecutionContext(executionContext: ExecutionContext): BlazeClientBuilder[F]
def withIdleTimeout(idleTimeout: Duration): BlazeClientBuilder[F]
def withMaxChunkSize(maxChunkSize: Int): BlazeClientBuilder[F]
def withMaxConnectionsPerRequestKey(maxConnectionsPerRequestKey: RequestKey => Int): BlazeClientBuilder[F]
def withMaxHeaderLength(maxHeaderLength: Int): BlazeClientBuilder[F]
def withMaxResponseLineSize(maxResponseLineSize: Int): BlazeClientBuilder[F]
def withMaxTotalConnections(maxTotalConnections: Int): BlazeClientBuilder[F]
def withMaxWaitQueueLimit(maxWaitQueueLimit: Int): BlazeClientBuilder[F]
def withRequestTimeout(requestTimeout: Duration): BlazeClientBuilder[F]
def withResponseHeaderTimeout(responseHeaderTimeout: Duration): BlazeClientBuilder[F]
def withScheduler(scheduler: TickWheelExecutor): BlazeClientBuilder[F]
def withSslContext(sslContext: SSLContext): BlazeClientBuilder[F]

Use the provided SSLContext when making secure calls

Use the provided SSLContext when making secure calls

def withUserAgent(userAgent: User-Agent): BlazeClientBuilder[F]
def withUserAgentOption(userAgent: Option[User-Agent]): BlazeClientBuilder[F]

Disable secure calls

Disable secure calls

Deprecated methods

@deprecated(message = "Use withDefaultSslContext, withSslContext or withoutSslContext to set the SSLContext", since = "0.22.0-M1")
def withSslContextOption(sslContext: Option[SSLContext]): BlazeClientBuilder[F]

Use some provided SSLContext when making secure calls, or disable secure calls with None

Use some provided SSLContext when making secure calls, or disable secure calls with None

Deprecated
[Since version 0.22.0-M1] Use withDefaultSslContext, withSslContext or withoutSslContext to set the SSLContext

Inherited methods

def allocated: F[(Client[F], F[Unit])]

Returns an effect that allocates a backend and an F[Unit] to release it. The returned F waits until the backend is ready to process requests. The second element of the tuple shuts down the backend when run.

Returns an effect that allocates a backend and an F[Unit] to release it. The returned F waits until the backend is ready to process requests. The second element of the tuple shuts down the backend when run.

Unlike resource and stream, there is no automatic release of the backend. This function is intended for REPL sessions, tests, and other situations where composing a cats.effect.Resource or fs2.Stream is not tenable. resource or stream is recommended wherever possible.

Inherited from
BackendBuilder
def channelOption[A](socketOption: SocketOption[A]): Option[A]
Inherited from
BlazeBackendBuilder
def socketKeepAlive: Option[Boolean]
Inherited from
BlazeBackendBuilder
def socketReceiveBufferSize: Option[Int]
Inherited from
BlazeBackendBuilder
def socketReuseAddress: Option[Boolean]
Inherited from
BlazeBackendBuilder
def socketSendBufferSize: Option[Int]
Inherited from
BlazeBackendBuilder
def stream: Stream[F, Client[F]]

Returns the backend as a single-element stream. The stream does not emit until the backend is ready to process requests. The backend is shut down when the stream is finalized.

Returns the backend as a single-element stream. The stream does not emit until the backend is ready to process requests. The backend is shut down when the stream is finalized.

Inherited from
BackendBuilder
def tcpNoDelay: Option[Boolean]
Inherited from
BlazeBackendBuilder
def withChannelOption[A](key: SocketOption[A], value: A): Self
Inherited from
BlazeBackendBuilder
def withDefaultChannelOption[A](key: SocketOption[A]): Self
Inherited from
BlazeBackendBuilder
Inherited from
BlazeBackendBuilder
Inherited from
BlazeBackendBuilder
Inherited from
BlazeBackendBuilder
Inherited from
BlazeBackendBuilder
Inherited from
BlazeBackendBuilder
def withSocketKeepAlive(socketKeepAlive: Boolean): Self
Inherited from
BlazeBackendBuilder
def withSocketReceiveBufferSize(socketReceiveBufferSize: Int): Self
Inherited from
BlazeBackendBuilder
def withSocketReuseAddress(socketReuseAddress: Boolean): Self
Inherited from
BlazeBackendBuilder
def withSocketSendBufferSize(socketSendBufferSize: Int): Self
Inherited from
BlazeBackendBuilder
def withTcpNoDelay(tcpNoDelay: Boolean): Self
Inherited from
BlazeBackendBuilder

Concrete fields

val asynchronousChannelGroup: Option[AsynchronousChannelGroup]
val bufferSize: Int
val channelOptions: ChannelOptions
val connectTimeout: Duration
val customDnsResolver: Option[RequestKey => Either[Throwable, InetSocketAddress]]
val executionContext: ExecutionContext
val idleTimeout: Duration
val maxChunkSize: Int
val maxConnectionsPerRequestKey: RequestKey => Int
val maxHeaderLength: Int
val requestTimeout: Duration
val responseHeaderTimeout: Duration
val scheduler: Resource[F, TickWheelExecutor]
val sslContext: SSLContextOption
val userAgent: Option[User-Agent]