Liking cljdoc? Tell your friends :D

thrift-clj.core

Thrift/Clojure Integration

Thrift/Clojure Integration
raw docstring

->cljclj

(->clj v)
source

->thriftclj

(->thrift v)
source

blocking-server-transportclj

(blocking-server-transport port {:keys [bind client-timeout]})

Create blocking server transport on the given port.

Create blocking server transport on the given port.
sourceraw docstring

connect!clj

(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.
sourceraw docstring

defservicecljmacro

(defservice id service-cls & implementation)

Define var containing the service.

Define var containing the service.
sourceraw docstring

disconnect!clj

(disconnect! client)

Close Client Transport.

Close Client Transport.
sourceraw docstring

fast-framedclj

(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).
sourceraw docstring

framedclj

(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).
sourceraw docstring

httpclj

(http url & {:keys [connect-timeout read-timeout custom-headers]})

Create HTTP transport.

Create HTTP transport.
sourceraw docstring

importcljmacro

(import & specs)
source

import-allcljmacro

(import-all & packages)

Load all Thrift Entities in the given packages.

Load all Thrift Entities in the given packages.
sourceraw docstring

import-all-clientscljmacro

(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.
sourceraw docstring

import-all-servicescljmacro

(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.
sourceraw docstring

import-all-typescljmacro

(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.
sourceraw docstring

import-clientscljmacro

(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`
sourceraw docstring

import-ifacecljmacro

(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.
sourceraw docstring

import-servicescljmacro

(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`
sourceraw docstring

import-typescljmacro

(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.
sourceraw docstring

multi-threaded-serverclj

(multi-threaded-server iface port & opts)

Create multi-threaded Server using the given Iface Implementation.

Create multi-threaded Server using the given Iface Implementation.
sourceraw docstring

nonblocking-serverclj

(nonblocking-server iface port & opts)

Create non-blocking Server using the given Iface Implementation.

Create non-blocking Server using the given Iface Implementation.
sourceraw docstring

nonblocking-server-transportclj

(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.
sourceraw docstring

serve!clj

(serve! server)

Start Server in a new Thread. Returns the Server.

Start Server in a new Thread. Returns the Server.
sourceraw docstring

serve-and-block!clj

(serve-and-block! server)

Start Server, blocking the current Thread indefinitely.

Start Server, blocking the current Thread indefinitely.
sourceraw docstring

servicecljmacro

(service service-cls & implementation)

Implement the given, previously imported Service.

Implement the given, previously imported Service.
sourceraw docstring

single-threaded-serverclj

(single-threaded-server iface port & opts)

Create single-threaded Server using the given Iface Implementation.

Create single-threaded Server using the given Iface Implementation.
sourceraw docstring

stop!clj

(stop! server)

Stop the given Server. Returns the Server.

Stop the given Server. Returns the Server.
sourceraw docstring

streamsclj

(streams in out)

Create IOStream transport.

Create IOStream transport.
sourceraw docstring

tcpclj

(tcp port)
(tcp host port)

Create TCP transport.

Create TCP transport.
sourceraw docstring

tcp-asyncclj

(tcp-async port)
(tcp-async host port)

Create non-blocking TCP transport.

Create non-blocking TCP transport.
sourceraw docstring

throwcljmacro

(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.
sourceraw docstring

trycljmacro

(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.
sourceraw docstring

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

× close