The following documentation is automatically generated. Please do not edit this file, but rather the original, inline with Test::Myriad::Service at lib/Test/Myriad/Service.pm (on the system that originally ran this). If you do edit this file, and don't want your changes to be removed, make sure you change the first line.
Test::Myriad::Service - an abstraction to mock microservices.
my $service = Myriad::Test::Service->new(..); $service->add_rpc('rpc_name', %default_response);
Attaches a new RPC to the service with a defaultt response.
name - The name of the RPC.
name
response - A hash that will be sent as the response.
response
Override the original RPC response for a single call.
name - The name of the RPC to be mocked.
A shortcut to call an RPC in the current service.
The call will be conducted over Myriad Transport and not as a method invocation.
method - The RPC method name.
method
args - A hash of the method arguments.
args
Creats a new subscription in the service.
This sub takes the source of the data in multiple ways described in the parameters section, only one of them required.
channel - The channel name that the events will be emitted to.
channel
array - A perl arrayref that its content is going to be emitted as events.
array
Adds a new receiver in the given service.
from - The source service name.
from
channel - The source of the events channel name.
handler - A coderef that will handle the events.
handler
BUILDARGS
Deriv Group Services Ltd. DERIV@cpan.org.
DERIV@cpan.org
See "CONTRIBUTORS" in Myriad for full details.
Copyright Deriv Group Services Ltd 2020. Licensed under the same terms as Perl itself.
To install Myriad, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Myriad
CPAN shell
perl -MCPAN -e shell install Myriad
For more information on module installation, please visit the detailed CPAN module installation guide.