Module deigma

Behaviours: supervisor.

Data Types

ask_opt()

ask_opt() = {max_rate, non_neg_integer() | infinity}

Function Index

ask/2Ask Category to sample an EventType event.
ask/3Ask Category to sample an EventType event using custom function or overridden options.
ask/4Ask Category to sample an EventType event using custom function and overridden options.
child_spec/1Declare a deigma instance named Category under your own supervisor.
start/1Start a deigma instance named Category
start_link/1Start a deigma instance named Category under your own supervisor.
stop/1Stop a deigma instance named Category

Function Details

ask/2

ask(Category, EventType) -> {Decision, SamplingPercentage}

Ask Category to sample an EventType event

Returns: SamplingPercentage is a floating point number between 0.0 and 1.0 representing the percentage of events that were sampled during the last 1000 milliseconds, including the event reported just now.

See also: ask/3, ask/4.

ask/3

ask(Category, EventType, EventFun::EventFun | Opts) -> {Decision, SamplingPercentage} | EventFunResult

Ask Category to sample an EventType event using custom function or overridden options

If called with EventFun, it will return or throw whathever EventFun returns or throws. If called with Opts, it will return the same as :ask/2.

See also: ask/2, ask/4.

ask/4

ask(Category, EventType, EventFun, Opts) -> EventFunResult

Ask Category to sample an EventType event using custom function and overridden options

It will return or throw whathever EventFun returns or throws.

See also: ask/2, ask/3.

child_spec/1

child_spec(Category) -> supervisor:child_spec()

Declare a deigma instance named Category under your own supervisor

See also: start/1, start_link/2.

start/1

start(Category) -> {ok, pid()} | {error, term()}

Start a deigma instance named Category

See also: child_spec/1, start_link/1, stop/1.

start_link/1

start_link(Category) -> {ok, pid()} | {error, term()}

Start a deigma instance named Category under your own supervisor

See also: child_spec/1, start/1.

stop/1

stop(Category) -> ok | {error, not_started}

Stop a deigma instance named Category

See also: child_spec/1, start_link/1, stop/1.


Generated by EDoc, Jun 17 2018, 17:43:00.