Thrift/Clojure Integration
Thrift/Clojure Integration
(blocking-server-transport port {:keys [bind client-timeout]})
Create blocking server transport on the given port.
Create blocking server transport on the given port.
(connect! client-class transport & {:keys [protocol]})
Create new Client of the given Class that connects to the given service.
Create new Client of the given Class that connects to the given service.
(defservice id service-cls & implementation)
Define var containing the service.
Define var containing the service.
(disconnect! client)
Close Client Transport.
Close Client Transport.
(fast-framed t & {:keys [max-frame-length initial-buffer-size]})
Wrap transport with fast framed transport (compatible with framed
, but using
persistent byte buffers).
Wrap transport with fast framed transport (compatible with `framed`, but using persistent byte buffers).
(framed t & {:keys [max-frame-length]})
Wrap transport with framed transport (prefixes messages with 4 byte frame size).
Wrap transport with framed transport (prefixes messages with 4 byte frame size).
(http url & {:keys [connect-timeout read-timeout custom-headers]})
Create HTTP transport.
Create HTTP transport.
(import-all & packages)
Load all Thrift Entities in the given packages.
Load all Thrift Entities in the given packages.
(import-all-clients & packages)
Import all services that reside in a package with one of the given prefixes.
Import all services that reside in a package with one of the given prefixes.
(import-all-services & packages)
Import all services that reside in a package with one of the given prefixes.
Import all services that reside in a package with one of the given prefixes.
(import-all-types & packages)
Import all types that reside in a package with one of the given prefixes.
Import all types that reside in a package with one of the given prefixes.
(import-clients & services)
Import the given Thrift Clients making them accessible via defservice
.
There are three types of specification formats:
package.Class
: load exactly this client, using the name Class
[package Class1 Class2 ...]
: load the given client from the package, using class names
as type names[package.Class :as N]
: load the given client, using the name N
Import the given Thrift Clients making them accessible via `defservice`. There are three types of specification formats: - `package.Class`: load exactly this client, using the name `Class` - `[package Class1 Class2 ...]`: load the given client from the package, using class names as type names - `[package.Class :as N]`: load the given client, using the name `N`
(import-iface & services)
Import the given Thrift Iface without creating Services/Clients to handle it.
Import the given Thrift Iface without creating Services/Clients to handle it.
(import-services & services)
Import the given Thrift Services making them accessible via defservice
.
There are three types of specification formats:
package.Class
: load exactly this service, using the name Class
[package Class1 Class2 ...]
: load the given services from the package, using class names
as type names[package.Class :as N]
: load the given service, using the name N
Import the given Thrift Services making them accessible via `defservice`. There are three types of specification formats: - `package.Class`: load exactly this service, using the name `Class` - `[package Class1 Class2 ...]`: load the given services from the package, using class names as type names - `[package.Class :as N]`: load the given service, using the name `N`
(import-types & types)
Import the given Thrift Types making them accessible as Clojure Types of the same name.
Import the given Thrift Types making them accessible as Clojure Types of the same name.
(multi-threaded-server iface port & opts)
Create multi-threaded Server using the given Iface Implementation.
Create multi-threaded Server using the given Iface Implementation.
(nonblocking-server iface port & opts)
Create non-blocking Server using the given Iface Implementation.
Create non-blocking Server using the given Iface Implementation.
(nonblocking-server-transport port {:keys [bind client-timeout]})
Create non-blocking server transport on the given port.
Create non-blocking server transport on the given port.
(serve! server)
Start Server in a new Thread. Returns the Server.
Start Server in a new Thread. Returns the Server.
(serve-and-block! server)
Start Server, blocking the current Thread indefinitely.
Start Server, blocking the current Thread indefinitely.
(service service-cls & implementation)
Implement the given, previously imported Service.
Implement the given, previously imported Service.
(single-threaded-server iface port & opts)
Create single-threaded Server using the given Iface Implementation.
Create single-threaded Server using the given Iface Implementation.
(stop! server)
Stop the given Server. Returns the Server.
Stop the given Server. Returns the Server.
(tcp-async port)
(tcp-async host port)
Create non-blocking TCP transport.
Create non-blocking TCP transport.
(throw ex & args)
Throw Exception. May take the Clojure representation of a Thrift Exception.
Throw Exception. May take the Clojure representation of a Thrift Exception.
(try & forms)
Try executing the given Forms catching Exceptions that can be identified by their Clojure equivalent.
Try executing the given Forms catching Exceptions that can be identified by their Clojure equivalent.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close