NAME
Myriad::Subscription - microservice subscription abstraction
SYNOPSIS
my $storage = $myriad->subscription;
DESCRIPTION
Implementation
Note that this is defined as a rôle, so it does not provide a concrete implementation - instead, see classes such as:
METHODS
create_from_sink
Register a new Receiver
to notify it when there is new data.
it takes a hash as an argument that should have the following
sink
- a Ryu::Sink that the subscription will emit new messages to.channel
- The events channel name where theEmitter
will emit the new events.client
- The name that thisReceiver
should use while fetching new events.
create_from_source
Register a new Emitter
to receive events from.
it takes a hash as an argument that should have the following
source
- a Ryu::Source where the messages will be emitted to.channel
- The name of the events channel that should be used to send the messages to.
start
Start processing the subscriptions.
stop
Stop processing the subscriptions.
INHERITED METHODS
AUTHOR
Deriv Group Services Ltd. DERIV@cpan.org
.
See "CONTRIBUTORS" in Myriad for full details.
LICENSE
Copyright Deriv Group Services Ltd 2020-2022. Licensed under the same terms as Perl itself.