Myriad::Storage::Implementation::Redis - access to microservice storage via Redis
This provides an implementation of Myriad::Role::Storage using https://redis.io as the underlying storage mechanism and transport layer.
See Myriad::Role::Storage for API details.
Add the storage prefix to the key before sending it to Redis
Takes the following parameters:
$k - the relative key in storage
$k
Returns a Future which will resolve to the corresponding value, or undef if none.
undef
$v - the scalar value to set
$v
Note that references are currently not supported - attempts to write an arrayref, hashref or object will fail.
Returns a Future which will resolve on completion.
Returns a Future which will resolve to the original value on completion.
Returns a Future which will resolve to the corresponding incremented value, or undef if none.
Observe a specific key.
Returns a Ryu::Source which will emit the current and all subsequent values.
Observe and entire namespace.
Returns a Future which will resolve to .
Returns a Future which will resolve to the scalar value for this key.
Returns a Future indicating success or failure.
Returns a Future which will resolve to a list of the keys in no defined order.
Returns a Future which will resolve to a list of the values in no defined order.
Returns a Future which will resolve to true if the key exists in this hash.
Returns a Future which will resolve to the count of the keys in this hash.
Returns a Future which will resolve to a list of key/value pairs, suitable for assigning to a hash.
$s - the scalar score to be attached to member
$s
$m - the scalar member value
$m
Note that references are not supported - attempts to write an arrayref, hashref or object will fail.
Redis sorted sets data structure family. add a scored member value to a storage key
Redis sorted sets data structure family. removes a specific member from ordered set in storage
$min - the minimum score
$min
$max - the max score
$max
Redis sorted sets data structure family. removes all members with scores between minimum and maximum within an ordered set in storage
Redis sorted sets data structure family. gives the members count within the provided min and max scores in an ordered set.
$with_score - flag to return members with or without scores
$with_score
Redis sorted sets data structure family. gives list of members within the provided min and max scores in an ordered set.
BUILDARGS
Deriv Group Services Ltd. DERIV@cpan.org.
DERIV@cpan.org
See "CONTRIBUTORS" in Myriad for full details.
Copyright Deriv Group Services Ltd 2020-2022. 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.