Liking cljdoc? Tell your friends :D

pallet.crate.network-service

Crate for working with network services

Crate for working with network services
raw docstring

wait-for-http-statusclj

(wait-for-http-status url
                      status
                      &
                      {:keys [max-retries standoff url-name cookie insecure
                              ssl-version]
                       :or {max-retries 5 standoff 2 url-name url}})

Wait for a url to respond with the given HTTP status code.

Options:

  • :standoff time between checking HTTP status (seconds)
  • :max-retries number of times to test HTTP status before erroring
  • :url-name name of url to use in messages (defaults to url)
Wait for a url to respond with the given HTTP status code.

Options:
- :standoff      time between checking HTTP status (seconds)
- :max-retries   number of times to test HTTP status before erroring
- :url-name      name of url to use in messages (defaults to url)
sourceraw docstring

wait-for-port-listenclj

(wait-for-port-listen
  port
  &
  {:keys [max-retries standoff service-name protocol]
   :or
     {max-retries 5 standoff 2 protocol :tcp service-name (str "port " port)}})

Wait for the network port port to be in a listening state.

Options:

  • :standoff time between checking port state (seconds)
  • :max-retries number of times to test port state before erroring
  • :service-name name of service to use in messages (defaults to port)
  • :protocol name of the network protocol family (:raw, :tcp, :udp or :udplite, defaults to :tcp)
Wait for the network port `port` to be in a listening state.

Options:
- :standoff      time between checking port state (seconds)
- :max-retries   number of times to test port state before erroring
- :service-name  name of service to use in messages (defaults to port)
- :protocol      name of the network protocol family (:raw, :tcp, :udp or :udplite, defaults to :tcp)
sourceraw docstring

wait-for-port-responseclj

(wait-for-port-response port
                        message
                        response-regex
                        &
                        {:keys [host timeout max-retries standoff service-name]
                         :or {host "localhost"
                              max-retries 5
                              standoff 2
                              timeout 2
                              service-name (str "port " port)}})

Wait for a port to respond to a message with a given response regex.

Options:

  • :host host to check (defaults to localhost)
  • :timeout time to wait for a response (default 2 secs)
  • :standoff time between checking HTTP status (seconds)
  • :max-retries number of times to test HTTP status before erroring
  • :service-name name of service to use in messages (defaults to port)
Wait for a port to respond to a message with a given response regex.

Options:
- :host          host to check (defaults to localhost)
- :timeout       time to wait for a response (default 2 secs)
- :standoff      time between checking HTTP status (seconds)
- :max-retries   number of times to test HTTP status before erroring
- :service-name  name of service to use in messages (defaults to port)
sourceraw docstring

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

× close