Behaviours: gen_server.
execution() = sync | async | supervised
name() = term()
opts() = #{id := supervisor:child_id(), name := name(), channel := kyu_channel:name(), confirms := boolean()}
await/1 | Equivalent to kyu_publisher:await(Name, 60000). |
await/2 | Waits for the publisher to successfully setup. |
call/2 | Makes a gen_server:call/2 to the publisher. |
call/3 | Makes a gen_server:call/3 to the publisher. |
cast/2 | Makes a gen_server:cast/2 to the publisher. |
channel/1 | Returns the name of the publisher's channel. |
child_spec/2 | Returns a publisher child spec. |
connection/1 | Returns the name of the publisher's connection. |
option/3 | Returns a value from the publisher's options. |
publish/2 | Publishes a message on the channel. |
start_link/2 | Starts a publisher. |
status/1 | Returns the up atom if the publisher is running and has an active channel. |
stop/1 | Gracefully stops the publisher. |
where/1 | Returns the pid of the publisher. |
await(Name::name()) -> ok
Equivalent to kyu_publisher:await(Name, 60000).
await(Name::name(), Timeout::timeout()) -> ok
Waits for the publisher to successfully setup.
call(Name::name(), Request::term()) -> term()
Makes a gen_server:call/2 to the publisher.
call(Name::name(), Request::term(), Timeout::timeout()) -> term()
Makes a gen_server:call/3 to the publisher.
cast(Name::name(), Request::term()) -> ok
Makes a gen_server:cast/2 to the publisher.
channel(Name::name()) -> kyu_channel:name()
Returns the name of the publisher's channel.
child_spec(Connection::kyu_connection:name(), Opts::opts()) -> supervisor:child_spec()
Returns a publisher child spec.
connection(Name::name()) -> kyu_connection:name()
Returns the name of the publisher's connection.
option(Name::name(), Key::atom(), Value::term()) -> term()
Returns a value from the publisher's options.
publish(Name::name(), Message::kyu:message()) -> ok | {error, binary()}
Publishes a message on the channel.
start_link(Connection::kyu_connection:name(), Opts::opts()) -> {ok, pid()} | {error, term()}
Starts a publisher.
status(Name::name()) -> up | down
Returns the up atom if the publisher is running and has an active channel.
stop(Name::name()) -> ok
Gracefully stops the publisher.
where(Name) -> any()
Returns the pid of the publisher. -spec where(Name :: name()) -> pid() | undefined.
Generated by EDoc