Liking cljdoc? Tell your friends :D

consul.core

Core consul constructor functions.

Core consul constructor functions.
raw docstring

cache-configclj

(cache-config & args)

Create a com.orbitz.consul.config.CacheConfig.

If the sole argument is a CacheConfig, return that argument.

Otherwise, build a CacheConfig based on keyword keys:

  • :back-off-delay A sequence of the [min-delay max-delay], or a single [delay] value. Values are duration specs.
  • :min-delay-between-requests The min delay between requests. A duration spec.
  • :timeout-auto-adjusted A boolean.
  • :timeout-auto-adjustment-margin The timeout adjustment margin. A duration spec.
  • :refresh-error-logged-as-warning A boolean.
  • :refresh-error-logged-as-error A boolean.
  • :refresh-error-logged-as A com.orbitz.conul.config.CacheConfig$RefreshErrorLogConsumer instance.

All duration specs can either be a long (milliseconds), a float (seconds), a pair of [long java.util.concurrent.TimeUnit], a java.time.Duration, or a string to parse with java.time.Duration/parse.

Create a com.orbitz.consul.config.CacheConfig.

If the sole argument is a CacheConfig, return that argument.

Otherwise, build a CacheConfig based on keyword keys:

* :back-off-delay  A sequence of the [min-delay max-delay], or a single [delay] value. Values are duration specs.
* :min-delay-between-requests The min delay between requests. A duration spec.
* :timeout-auto-adjusted A boolean.
* :timeout-auto-adjustment-margin The timeout adjustment margin. A duration spec.
* :refresh-error-logged-as-warning A boolean.
* :refresh-error-logged-as-error A boolean.
* :refresh-error-logged-as A com.orbitz.conul.config.CacheConfig$RefreshErrorLogConsumer instance.

All duration specs can either be a long (milliseconds), a float (seconds), a pair of [long java.util.concurrent.TimeUnit],
a java.time.Duration, or a string to parse with java.time.Duration/parse.
sourceraw docstring

catalog-registrationclj

(catalog-registration & args)

Construct a com.orbitz.consul.model.catalog.CatalogRegistration.

The arguments may be a single CatalogRegistration instance

Construct a com.orbitz.consul.model.catalog.CatalogRegistration.

The arguments may be a single CatalogRegistration instance
sourceraw docstring

checkclj

(check & args)

Construct a com.orbitz.consul.model.agent.Check.

The arguments may be a single Check instanec, or keyword arguments:

  • :id The check ID string.
  • :name The check name string.
  • :notes The check notes string.
  • :output The check output string.
  • :script The check script string.
  • :interval The check interval duration string.
  • :ttl The check TTL duration string.
  • :http The HTTP check string.
  • :tcp The TCP check string.
  • :grpc The gRPC check string.
  • :grpc-use-tls? A boolean, whether to use TLS for gRPC checks.
  • :service-id The service ID string.
  • :service-tags A sequence of service tag strings.
  • :deregister-critical-service-after A duration string.
Construct a com.orbitz.consul.model.agent.Check.

The arguments may be a single Check instanec, or keyword arguments:

* :id          The check ID string.
* :name        The check name string.
* :notes       The check notes string.
* :output      The check output string.
* :script      The check script string.
* :interval    The check interval duration string.
* :ttl         The check TTL duration string.
* :http        The HTTP check string.
* :tcp         The TCP check string.
* :grpc        The gRPC check string.
* :grpc-use-tls? A boolean, whether to use TLS for gRPC checks.
* :service-id  The service ID string.
* :service-tags A sequence of service tag strings.
* :deregister-critical-service-after A duration string.
sourceraw docstring

client-configurationclj

(client-configuration & args)

Create a com.orbitz.consul.config.ClientConfig.

If the sole argument is a ClientConfig, return that argument.

Otherwise, build a ClientConfig based on keyword keys:

  • :cache-config The cache config. See consul.core/cache-config.
Create a com.orbitz.consul.config.ClientConfig.

If the sole argument is a ClientConfig, return that argument.

Otherwise, build a ClientConfig based on keyword keys:

* :cache-config The cache config. See consul.core/cache-config.
sourceraw docstring

consistency-modeclj

(consistency-mode v)

Coerce the argument to a com.orbitz.consul.option.ConsistencyMode.

Coerce the argument to a com.orbitz.consul.option.ConsistencyMode.
sourceraw docstring

consulclj

(consul & args)

Construct a consul client.

Passing in an instance of com.orbitz.consul.Consul as the only argument returns that argument.

Otherwise, a new consul client is constructed based on keyword arguments:

  • :url A java.net.URL, the consul agent URL to use.
  • :ping A boolean, whether or not to ping the server first.
  • :basic-auth Basic authentication credentials. This can be a map with keys :username and :password, or a sequence [username, password].
  • :acl-token An ACL token string.
  • :headers A map of string->string, headers to add to requests.
  • :consul-bookend A com.orbitz.consul.util.bookend.ConsulBookend instance.
  • :host-and-port A map of keys (:host, :port), or a string "host:port", or a com.google.common.net.HostAndPort instance. The host and port to connect to the consul agent.
  • :ssl-context A javax.net.ssl.SSLContext instance.
  • :trust-manager A javax.net.ssl.X509TrustManager instance.
  • :hostname-verifier A javax.net.ssl.HostnameVerifier instance.
  • :proxy A java.net.Proxy instance.
  • :connect-timeout The connect timeout; this can be a long (milliseconds), a float (seconds), a pair of [long, java.util.concurrent.TimeUnit], a java.time.Duration, or a string (parsed via Duration.parse). The minimum granularity is milliseconds.
  • :read-timeout The read timeout; see connect-timeout.
  • :write-timeout The write timeout; see connect-timeout.
  • :executor-service A java.util.concurrent.ExecutorService instance.
  • :client-configuration A com.orbitz.consul.config.ClientConfig instance, or a map that specs out fields of that class. See consul.core/client-configuration.
  • :client-event-callback A com.orbitz.consul.monitoring.ClientEventCallback instance.
Construct a consul client.

Passing in an instance of com.orbitz.consul.Consul as the only argument
returns that argument.

Otherwise, a new consul client is constructed based on keyword arguments:

* :url            A java.net.URL, the consul agent URL to use.
* :ping           A boolean, whether or not to ping the server first.
* :basic-auth     Basic authentication credentials. This can be a map with keys
                  :username and :password, or a sequence [username, password].
* :acl-token      An ACL token string.
* :headers        A map of string->string, headers to add to requests.
* :consul-bookend A com.orbitz.consul.util.bookend.ConsulBookend instance.
* :host-and-port  A map of keys (:host, :port), or a string "host:port",
                  or a com.google.common.net.HostAndPort instance. The host
                  and port to connect to the consul agent.
* :ssl-context    A javax.net.ssl.SSLContext instance.
* :trust-manager  A javax.net.ssl.X509TrustManager instance.
* :hostname-verifier A javax.net.ssl.HostnameVerifier instance.
* :proxy          A java.net.Proxy instance.
* :connect-timeout The connect timeout; this can be a long (milliseconds),
                   a float (seconds), a pair of [long, java.util.concurrent.TimeUnit],
                   a java.time.Duration, or a string (parsed via Duration.parse). The
                   minimum granularity is milliseconds.
* :read-timeout   The read timeout; see connect-timeout.
* :write-timeout  The write timeout; see connect-timeout.
* :executor-service A java.util.concurrent.ExecutorService instance.
* :client-configuration A com.orbitz.consul.config.ClientConfig instance, or a map
                        that specs out fields of that class. See consul.core/client-configuration.
* :client-event-callback A com.orbitz.consul.monitoring.ClientEventCallback instance.
sourceraw docstring

host-and-portclj

(host-and-port & args)

Construct a com.google.common.net.HostAndPort.

Arguments may be any of:

  • A HostAndPort instance.
  • A single host string, or a host:port string.
  • A host string, and a port number.
  • A map with keys :host and optionally :port.
Construct a com.google.common.net.HostAndPort.

Arguments may be any of:

* A HostAndPort instance.
* A single host string, or a host:port string.
* A host string, and a port number.
* A map with keys :host and optionally :port.
sourceraw docstring

operationclj

(operation & args)

Construct a com.orbitz.consul.model.kv.Operation.

If passed a single Operation argument, return that argument. Otherwise interpret the keyword arguments:

  • :verb The verb string.
  • :key The key string.
  • :value The value string.
  • :flags A long bitset of flags.
  • :index The BigInteger index value.
  • :session The session string.
Construct a com.orbitz.consul.model.kv.Operation.

If passed a single Operation argument, return that argument.
Otherwise interpret the keyword arguments:

* :verb       The verb string.
* :key        The key string.
* :value      The value string.
* :flags      A long bitset of flags.
* :index      The BigInteger index value.
* :session    The session string.
sourceraw docstring

query-optionsclj

(query-options & args)

Construct a com.orbitz.consul.option.QueryOptions.

The argument may be a QueryOptions instance, or keyword keys:

  • :wait The wait duration string (e.g. 1m, 30s).
  • :token The token string.
  • :index A BigInteger index.
  • :near The near string.
  • :datacenter The datacenter string.
  • :node-meta The node metadata map.
  • :tags The list of service tags.
  • :consistency-mode A string, keyword, or ConsistencyMode value.
Construct a com.orbitz.consul.option.QueryOptions.

The argument may be a QueryOptions instance, or keyword keys:

* :wait        The wait duration string (e.g. 1m, 30s).
* :token       The token string.
* :index       A BigInteger index.
* :near        The near string.
* :datacenter  The datacenter string.
* :node-meta   The node metadata map.
* :tags        The list of service tags.
* :consistency-mode A string, keyword, or ConsistencyMode value.
sourceraw docstring

reg-checkclj

(reg-check & args)

Construct a com.orbitz.consul.model.agent.Registration$RegCheck.

The argument may be an instance of RegCheck, or keyword arguments:

  • :script The script check string.
  • :interval The check interval duration string.
  • :ttl The TTL duration string.
  • :http The HTTP check string.
  • :tcp The TCP check string.
  • :grpc The gRPC check string.
  • :grpc-use-tls? A boolean, whether to use TLS for gRPC checks.
  • :timeout The timeout duration string.
  • :notes The notes string.
  • :deregister-critical-services-after A duration string to deregister critical services after.
  • :tls-skip-verify A boolean, whether to skip verification for TLS checks.
  • :status A status string.
Construct a com.orbitz.consul.model.agent.Registration$RegCheck.

The argument may be an instance of RegCheck, or keyword arguments:

* :script      The script check string.
* :interval    The check interval duration string.
* :ttl         The TTL duration string.
* :http        The HTTP check string.
* :tcp         The TCP check string.
* :grpc        The gRPC check string.
* :grpc-use-tls? A boolean, whether to use TLS for gRPC checks.
* :timeout     The timeout duration string.
* :notes       The notes string.
* :deregister-critical-services-after A duration string to deregister critical services after.
* :tls-skip-verify A boolean, whether to skip verification for TLS checks.
* :status      A status string.
sourceraw docstring

registrationclj

(registration & args)

Construct a com.orbitz.consul.model.agent.Registration.

The argument may be an instance of Registration, or keyword arguments.

  • :name The service name string.
  • :id The optional service ID string.
  • :address The service address.
  • :port The service port.
  • :checks A sequence of checks; each element may be a RegCheck instance, or a map containing keys as described in consul.core/reg-check.
  • :tags A sequence of tag strings.
  • :meta A map of metadata (string->string).
  • :enable-tag-override A boolean.
Construct a com.orbitz.consul.model.agent.Registration.

The argument may be an instance of Registration, or keyword arguments.

* :name        The service name string.
* :id          The optional service ID string.
* :address     The service address.
* :port        The service port.
* :checks      A sequence of checks; each element may be a RegCheck instance, or
               a map containing keys as described in consul.core/reg-check.
* :tags        A sequence of tag strings.
* :meta        A map of metadata (string->string).
* :enable-tag-override A boolean.
sourceraw docstring

tagged-addressesclj

(tagged-addresses & args)

Construct a com.orbitz.consul.model.catalog.TaggedAddresses.

The arguments may be a TaggedAddresses instance, or keyword arguments:

  • :lan The LAN address string.
  • :wan The WAN address string.
Construct a com.orbitz.consul.model.catalog.TaggedAddresses.

The arguments may be a TaggedAddresses instance, or keyword arguments:

* :lan   The LAN address string.
* :wan   The WAN address string.
sourceraw docstring

transaction-optionsclj

(transaction-options & args)

Construct a com.orbitz.consul.option.TransactionOptions.

If passed a single TransactionOptions argument, return that argument. Otherwise interpret the keyword arguments:

  • :datacenter The datacenter string.
  • :consistency-mode A ConsistencyMode instance, or a string consistency mode to parse.
Construct a com.orbitz.consul.option.TransactionOptions.

If passed a single TransactionOptions argument, return that argument.
Otherwise interpret the keyword arguments:

* :datacenter       The datacenter string.
* :consistency-mode A ConsistencyMode instance, or a string consistency mode to parse.
sourceraw docstring

write-requestclj

(write-request & args)

Construct a com.orbitz.consul.model.catalog.WriteRequest.

The arguments may be a single WriteRequest instance, or keyword keys:

  • :token The write request token string.
Construct a com.orbitz.consul.model.catalog.WriteRequest.

The arguments may be a single WriteRequest instance, or keyword keys:

* :token       The write request token string.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close