NAME
Myriad::Service::Attributes - microservice coördination
SYNOPSIS
DESCRIPTION
Attributes
Each of these is an attribute that can be applied to a method.
Note that this class is just a simple passthrough to Myriad::Registry, which does all the real work.
MODIFY_CODE_ATTRIBUTES
Due to Attribute::Handlers limitations at runtime, we need to pick up attributes ourselves.
RPC
Mark this async method as a callable RPC method.
async method example_rpc : RPC (%args) {
return \%args;
}
This will cause the method to be registered in "add_rpc" in Myriad::Registry.
Batch
Mark this as an async method which should be called repeatedly to generate arrayref batches of data.
has $id = 0;
async method example_batch : Batch {
return [ ++$id ];
}
Emitter
Indicates a method which should be called on startup, which given a Ryu::Sink will emit events to that sink until it's done.
Receiver
Indicates a method which should be called on startup and passed a Ryu::Source. Events will be emitted to that source until termination.
AUTHOR
Deriv Group Services Ltd. DERIV@cpan.org
.
See "CONTRIBUTORS" in Myriad for full details.
LICENSE
Copyright Deriv Group Services Ltd 2020-2021. Licensed under the same terms as Perl itself.