finagle-clojure.builder.client

Functions for creating and altering com.twitter.finagle.Client objects independent of any particular codec. Generally speaking codec-specific client functions should be preferred, but these are included for comptability with older systems configured at the client level.

build

(build b)

Given a completed ClientBuilder, return a new Service that represents this client.

Arguments:

  • a ClientBuilder

Returns:

a com.twitter.finagle.Service that represents a client request

builder

(builder)

close!

(close! client)

Stops the given client.

Arguments:

Returns:

a Future that closes when the client stops

codec

(codec b cdc)

Configures the given ServerBuilder with a codec.

Arguments:

  • b: a ClientBuilder
  • cdc: a Codec, CodecFactory, or Function1 that defines the server codec

Returns:

a ClientBuilder configured with the given codec

host-connection-limit

(host-connection-limit b limit)

Configures the given ClientBuilder with a host connection limit.

Arguments:

  • b: a ClientBuilder
  • limit: the number to limit connections to

Returns:

a ClientBuilder configured with the given limit

hosts

(hosts b hosts)

Configures the given ClientBuilder with one or more hosts.

Arguments:

  • b: a ClientBuilder
  • hosts: a SocketAddress, Seq<SocketAddress> or comma-separated string of hostnames

Returns:

a ClientBuilder configured with the given hosts

logger

(logger b l)

Configures the given ClientBuilder with a Logger.

Arguments:

Returns

a ClientBuilder configured with the given Logger

report-to

(report-to b rcvr)

Configures the given ClientBuilder with a StatsReceiver to report to.

Arguments:

Returns:

a ClientBulider configured with the given StatsReceiver

retries

(retries b retries)

Configures the given ClientBuilder with a retry limit.

Arguments:

  • b: a ClientBuilder
  • retries: the number of times to retry

Returns:

a ClientBuilder configured with the given retries

tcp-connect-timeout

(tcp-connect-timeout b timeout)

Configures the given ClientBuilder with a TCP connection timeout.

Arguments:

Returns:

a ClientBuilder configured with the given timeout