Module gen_stage_list_producer

A GenStage producer that creates a producer from lists or generator functions.

Behaviours: gen_stage.

Description

A GenStage producer that creates a producer from lists or generator functions. This is an Erlang-native replacement for Elixir's GenStage.Streamer.

Function Index

handle_cancel/3 Handle consumer cancellation.
handle_demand/2 Handle demand from consumers.
handle_info/2 Handle info messages.
handle_subscribe/4 Handle consumer subscription.
init/1 Initialize the streamer with the enumerable function or list.
start/1 Start a streamer without linking.
start/2 Start a streamer with enumerable function and options without linking.
start_link/1 Start a streamer with just the enumerable function and default options.
start_link/2 Start a streamer with enumerable function and options.

Function Details

handle_cancel/3

handle_cancel(Reason, X2, State) -> any()

Handle consumer cancellation.

handle_demand/2

handle_demand(Demand, State) -> any()

Handle demand from consumers.

handle_info/2

handle_info(Msg, State) -> any()

Handle info messages.

handle_subscribe/4

handle_subscribe(X1, Opts, X3, State) -> any()

Handle consumer subscription.

init/1

init(X1) -> any()

Initialize the streamer with the enumerable function or list.

start/1

start(EnumFun::function() | {from_list, list()}) -> gen_stage:on_start()

Start a streamer without linking.

start/2

start(EnumFun::function() | {from_list, list()}, Opts::proplists:proplist()) -> gen_stage:on_start()

Start a streamer with enumerable function and options without linking.

start_link/1

start_link(EnumFun::function() | {from_list, list()}) -> gen_stage:on_start()

Start a streamer with just the enumerable function and default options.

start_link/2

start_link(EnumFun::function() | {from_list, list()}, Opts::proplists:proplist()) -> gen_stage:on_start()

Start a streamer with enumerable function and options.


Generated by EDoc