kraken v0.1.1 Kraken.Request

Worker of Request subscribed to Limiter, call request to API and send an answer to Client.

Link to this section Summary

Functions

Set the subscription to manual to control when to ask for events

Starts an request worker linked to the current process. Takes events from Limiter and send requests through HTTPoison

Options

  • :name - used for name registration as described in the “Name registration” section of the module documentation. Default is Elixir.Kraken.Request
  • :limiters - list of limiters with max_demand options. For example [{Elixir.Kraken.Client.Limiter, max_demand: 1}]

Link to this section Types

Link to this type options()
options() :: [name: atom() | nil, limiters: [{atom(), keyword()} | atom()]]
Link to this type state()
state() :: :ok

Link to this section Functions

Link to this function handle_events(events, from, state)
handle_events([Kraken.Client.event()], GenStage.from(), state()) :: {:noreply, [], state()}
Link to this function handle_subscribe(atom, options, from, state)

Set the subscription to manual to control when to ask for events

Link to this function start_link(args)
start_link(options()) :: GenServer.on_start()

Starts an request worker linked to the current process. Takes events from Limiter and send requests through HTTPoison

Options

  • :name - used for name registration as described in the “Name registration” section of the module documentation. Default is Elixir.Kraken.Request
  • :limiters - list of limiters with max_demand options. For example [{Elixir.Kraken.Client.Limiter, max_demand: 1}].