View Source Ferryman.Client (FerrymanEx v0.1.0)

This module provides the Client API to communicate with a Ferryman Server.

overview

Overview

To start communicating with the Ferryman server, let's first start our redis process:

iex> {:ok, redis} = Redix.start_link()

Now we can simply call the functions, the server has implemented:

iex> Ferryman.Client.call(redis, "mychannel", "add", [1, 2])
{:ok, 3}

Link to this section Summary

Functions

Executes a function on the server and returns the response.

Executes a function on the server async, without a response.

Executes a function on the servers and returns a list of responses.

Link to this section Functions

Link to this function

call(redis, channel, method, params, timeout \\ 1)

View Source

Executes a function on the server and returns the response.

example

Example

iex> Ferryman.Client.call(redis, "mychannel", "add", [1, 2])
{:ok, 3}
Link to this function

cast(redis, channel, method, params)

View Source

Executes a function on the server async, without a response.

It will be unknown, wether the Ferryman server successfully handled the message.

Link to this function

multicall(redis, channel, method, params, timeout \\ 1)

View Source

Executes a function on the servers and returns a list of responses.

example

Example

iex> Ferryman.Client.multicall(redis, "mychannel", "add", [1, 2])
{:ok, 3}