View Source ProcessHub.Utility.Bag (ProcessHub v0.3.2-alpha)
Utility functions.
Summary
Functions
Returns all messages in the mailbox.
Generates child specs for testing.
Sends hook messages to the given process.
Waits and receives multiple messages.
Generates a hook manager for receiving messages.
Returns the current timestamp in the given precision.
Types
@type gen_child_specs_opts() :: [prefix: String.t(), id_type: :string | :atom]
Functions
@spec all_messages() :: [term()]
Returns all messages in the mailbox.
@spec gen_child_specs(integer(), gen_child_specs_opts()) :: list()
Generates child specs for testing.
@spec hook_erlang_send( term(), atom() | pid() | port() | reference() | {atom(), node()}, any() ) :: any()
Sends hook messages to the given process.
@spec receive_multiple(pos_integer(), term(), Keyword.t()) :: any()
Waits and receives multiple messages.
@spec recv_hook(atom(), pid()) :: ProcessHub.Service.HookManager.t()
Generates a hook manager for receiving messages.
@spec timestamp(:microsecond | :millisecond | :nanosecond | :second | pos_integer()) :: integer()
Returns the current timestamp in the given precision.