View Source ringbuffer_sup (ringbuffer v1.3.0)

Supervisor for the ring buffers processes.

Summary

Functions

Find the Pid of the ringbuffer with a certain name.

Supervisor callback, initialize the children.

Start a ringbuffer.

Start the simple_one_for_one supervisor for the ring buffer processes.

Stop a ringbuffer. The managing process is removed from the supervisor and the ets table is released.

Functions

find_child(Name)

-spec find_child(Name :: atom()) -> {ok, pid()} | {error, not_found}.

Find the Pid of the ringbuffer with a certain name.

init(_)

Supervisor callback, initialize the children.

start_child(Name, Size)

-spec start_child(Name :: atom(), Size :: pos_integer()) -> {ok, pid()} | {error, term()}.

Start a ringbuffer.

start_link()

Start the simple_one_for_one supervisor for the ring buffer processes.

stop_child(Name)

-spec stop_child(Name :: atom()) -> ok | {error, not_found}.

Stop a ringbuffer. The managing process is removed from the supervisor and the ets table is released.