Core consul constructor functions.
Core consul constructor functions.
(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:
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 The back-off delay, or the min back-off delay if back-off-max-delay is given. A duration spec. * :back-off-max-delay The max back-off-delay. If specified, you must also specify :back-off-delay, which will be the min delay. * :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.
(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
(check & args)
Construct a com.orbitz.consul.model.agent.Check.
The arguments may be a single Check instanec, or keyword arguments:
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.
(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:
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.
(consistency-mode v)
Coerce the argument to a com.orbitz.consul.option.ConsistencyMode.
Coerce the argument to a com.orbitz.consul.option.ConsistencyMode.
(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:
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.
(host-and-port & args)
Construct a com.google.common.net.HostAndPort.
Arguments may be any of:
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.
(operation & args)
Construct a com.orbitz.consul.model.kv.Operation.
If passed a single Operation argument, return that argument. Otherwise interpret the keyword arguments:
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.
(query-options & args)
Construct a com.orbitz.consul.option.QueryOptions.
The argument may be a QueryOptions instance, or keyword keys:
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.
(reg-check & args)
Construct a com.orbitz.consul.model.agent.Registration$RegCheck.
The argument may be an instance of RegCheck, or keyword arguments:
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.
(registration & args)
Construct a com.orbitz.consul.model.agent.Registration.
The argument may be an instance of Registration, or keyword arguments.
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.
(service & args)
Construct a com.orbitz.consul.model.health.Service
The arguments may be a single Service instance, or keyword keys:
Construct a com.orbitz.consul.model.health.Service The arguments may be a single Service instance, or keyword keys: * :id The service ID string. * :service The service name string. * :enable-tag-override A boolean. * :tags A list of tag strings. * :address The service address string. * :meta A map of string->string metadata. * :port The service port integer.
(tagged-addresses & args)
Construct a com.orbitz.consul.model.catalog.TaggedAddresses.
The arguments may be a TaggedAddresses instance, or keyword arguments:
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.
(transaction-options & args)
Construct a com.orbitz.consul.option.TransactionOptions.
If passed a single TransactionOptions argument, return that argument. Otherwise interpret the keyword arguments:
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.
(write-request & args)
Construct a com.orbitz.consul.model.catalog.WriteRequest.
The arguments may be a single WriteRequest instance, or keyword keys:
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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close