GSS.Client.Request (elixir_google_spreadsheets v0.4.0)

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

Summary

Functions

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

Callback implementation for GenStage.init/1.

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

Types

options()

@type options() :: [name: atom() | nil, limiters: [{atom(), keyword()} | atom()]]

state()

@type state() :: :ok

Functions

handle_events(list, from, state)

@spec handle_events([GSS.Client.event()], GenStage.from(), state()) ::
  {:noreply, [], state()}

Callback implementation for GenStage.handle_events/3.

handle_subscribe(atom, options, from, state)

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

init(args)

Callback implementation for GenStage.init/1.

start_link(args)

@spec start_link(options()) :: GenServer.on_start()

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

Options

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