Packages
launchdarkly_server_sdk
2.1.2
3.11.0
3.10.1
3.9.0
3.8.1
3.8.0
3.7.2
3.7.1
3.7.0
3.6.0
3.5.0
3.4.0
3.3.1
3.3.0
3.2.0
3.1.0
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.1.2
2.1.1
2.1.0
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.6.0
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.3
1.1.2
1.1.1
retired
1.1.0
retired
1.0.1
retired
1.0.0
retired
1.0.0-beta4
retired
1.0.0-beta3
retired
1.0.0-beta2
retired
LaunchDarkly SDK for Erlang
Current section
Files
Jump to
Current section
Files
src/ldclient_update_requestor.erl
%%-------------------------------------------------------------------
%% @doc `ldclient_update_requestor' module
%% @private
%% This is a behavior that event dispatchers must implement. It is used to send
%% event batches to LaunchDarkly.
%% @end
%%-------------------------------------------------------------------
-module(ldclient_update_requestor).
-type response() :: {ok, binary() | not_modified}
| {error, errors()}.
-type errors() :: {bad_status, non_neg_integer(), string()}
| network_error.
-export_type([response/0, errors/0]).
%% `all' must request and return all flags and segments, along with an updated
%% state value. It takes the destination URI, the SDK key, along with a state
%% value from `init' or the previous invocation of `all' to allow for features
%% such as ETag caching.
-callback all(Uri :: string(), State :: any()) -> {response(), any()}.
%% `init' should return an initial value for the `State' argument to `all'
-callback init(Tag :: atom(), SdkKey :: string()) -> any().