Behaviours: supervisor.
name() = term()
opts() = #{id := supervisor:child_id(), name := name(), queue := binary(), worker_module := atom(), worker_state := map(), worker_count := integer(), prefetch_count := integer(), commands := list(), duplex := boolean(), channel := kyu_channel:name()}
await/1 | Equivalent to kyu_consumer:await(Name, 60000). |
await/2 | Waits for the consumer to successfully consume its queue. |
channel/1 | Returns the name of the consumer's channel. |
check_opts/1 | Checks the validity of the provided consumer options. |
child_spec/2 | Returns a consumer child spec. |
connection/1 | Returns the name of the consumer's connection. |
queue/1 | Returns the name of the consumer's queue. |
start_link/2 | Starts a consumer. |
stop/1 | Gracefully stops the consumer. |
where/1 | Returns the pid of the consumer. |
await(Name::name()) -> ok
Equivalent to kyu_consumer:await(Name, 60000).
await(Name::name(), Timeout::timeout()) -> ok
Waits for the consumer to successfully consume its queue.
channel(Name::name()) -> kyu_channel:name()
Returns the name of the consumer's channel.
check_opts(Opts::opts()) -> ok
throws badmatch
Checks the validity of the provided consumer options.
child_spec(Connection::kyu_connection:name(), Opts::opts()) -> supervisor:child_spec()
Returns a consumer child spec.
connection(Name::name()) -> kyu_connection:name()
Returns the name of the consumer's connection.
queue(Name::name()) -> binary()
Returns the name of the consumer's queue.
start_link(Connection::kyu_connection:name(), Opts::opts()) -> {ok, pid()} | {error, term()}
Starts a consumer.
stop(Name::name()) -> ok
Gracefully stops the consumer.
where(Name) -> any()
Returns the pid of the consumer. -spec where(Name :: name()) -> pid() | undefined.
Generated by EDoc