Liking cljdoc? Tell your friends :D

puppetlabs.pcp.client


-closeclj

(-close client)

Inputs: [client :- Client] Returns: s/Bool

Close the connection. Prevent any reconnection attempt 1) by the concurrent 'connect' task, in case it's still executing, (NB: the 'connect' function operates asynchronously by invoking 'make-connection' in a separate thread) or 2) by the :on-close event handler. Stop the heartbeat thread.

Inputs: [client :- Client]
Returns: s/Bool

Close the connection. Prevent any reconnection attempt 1) by the concurrent
'connect' task, in case it's still executing, (NB: the 'connect' function
operates asynchronously by invoking 'make-connection' in a separate thread)
or 2) by the :on-close event handler. Stop the heartbeat thread.
sourceraw docstring

-make-connectionclj

(-make-connection client)

Inputs: [client :- Client] Returns: Object

Returns a connected WebSocket connection. In case of a SSLHandShakeException or ConnectException a further connection attempt will be made by following an exponential backoff, whereas other exceptions will be propagated.

Inputs: [client :- Client]
Returns: Object

Returns a connected WebSocket connection. In case of a SSLHandShakeException
or ConnectException a further connection attempt will be made by following an
exponential backoff, whereas other exceptions will be propagated.
sourceraw docstring

-wait-for-connectionclj

(-wait-for-connection client timeout)

Inputs: [client :- Client timeout :- s/Num] Returns: (s/maybe Client)

Waits until a client is connected. If timeout is hit, returns falsey

Inputs: [client :- Client timeout :- s/Num]
Returns: (s/maybe Client)

Waits until a client is connected. If timeout is hit, returns falsey
sourceraw docstring

ClientInterfacecljprotocol

client interface - make one with connect

client interface - make one with connect

closeclj

(close client)

Close the connection. Once the client is close you will need a new one.

NOTE: you must invoke this function to properly close the connection, otherwise reconnection attempts may happen and the heartbeat thread will persist, in case it was previously started.

Close the connection. Once the client is close you will need a
new one.

 NOTE: you must invoke this function to properly close the connection,
 otherwise reconnection attempts may happen and the heartbeat thread will
 persist, in case it was previously started.

connected?clj

(connected? client)

Returns true if the client is currently connected to the pcp-broker. Propagates any unhandled exception thrown while attempting to connect.

Returns true if the client is currently connected to the pcp-broker.
Propagates any unhandled exception thrown while attempting to connect.

connecting?clj

(connecting? client)

Returns true if the client is currently connecting to the pcp-broker

Returns true if the client is currently connecting to the pcp-broker

send!clj

(send! client message)

Send a message across the currently connected client. Will raise ::not-associated if the client is not currently associated with the pcp-broker, and ::not-connected if the client has become disconnected from the pcp-broker.

Send a message across the currently connected client. Will
raise ::not-associated if the client is not currently associated with the
pcp-broker, and ::not-connected if the client has become disconnected from
the pcp-broker.

wait-for-connectionclj

(wait-for-connection client timeout-ms)

Wait up to timeout-ms for a connection to be established. Returns the client if the connection has been established, else nil. Propagates any unhandled exception thrown while attempting to connect.

Wait up to timeout-ms for a connection to be established.
Returns the client if the connection has been established, else nil.
Propagates any unhandled exception thrown while attempting to connect.
sourceraw docstring

connectclj

(connect params handlers)

Inputs: [params :- ConnectParams handlers :- Handlers] Returns: Client

Asyncronously establishes a connection to a pcp-broker named by :server. Returns a Client.

The certificate file specified can provide either a single certificate, or a certificate chain (with the first entry being the client's certificate).

Inputs: [params :- ConnectParams handlers :- Handlers]
Returns: Client

Asyncronously establishes a connection to a pcp-broker named by
`:server`. Returns a Client.

 The certificate file specified can provide either a single certificate,
 or a certificate chain (with the first entry being the client's certificate).
sourceraw docstring

ConnectParamsclj

schema for connection parameters

schema for connection parameters
sourceraw docstring

get-ssl-contextcljmultimethod

source

Handlersclj

schema for handler map. String keys are data_schema handlers, keyword keys are special handlers (like :default)

schema for handler map. String keys are data_schema handlers,
keyword keys are special handlers (like :default)
sourceraw docstring

map->Clientclj

(map->Client m9283)

Factory function for class Client, taking a map of keywords to field values, but not much slower than ->x like the clojure.core version. (performance is fixed in Clojure 1.7, so this should eventually be removed.)

Factory function for class Client, taking a map of keywords to field values, but not much
slower than ->x like the clojure.core version.
(performance is fixed in Clojure 1.7, so this should eventually be removed.)
sourceraw docstring

SslFilesclj

source

strict-map->Clientclj

(strict-map->Client m9284 & [drop-extra-keys?__5213__auto__])

Factory function for class Client, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->

Factory function for class Client, taking a map of keywords to field values.  All keys are required, and no extra keys are allowed.  Even faster than map->
sourceraw docstring

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

× close