The following container can do the below
An example workflow of using the container on Direktiv.
id: redis
function:
- id: redis-op
image: vorteil/redis
description: "Gets a key value or set an array of KEY=VALUE strings"
states:
- id: redis-obj
type: action
action:
function: msg
input: .
{
"method": "get",
"addr": "localhost:6379",
"password": "",
"db": 0,
"values": "TEST"
}
{
"method": "set",
"addr": "localhost:6379",
"password": "",
"db": 0,
"values": ["TEST=TEST2", "TEST2=TEST3"]
}
If the action is successful, the redis should have stored each key and value. No output will be returned to the user.
If the action is successful, the output will be a json object like the following.
{
"value": "TEST2"
}
In the case that an error is encountered, it will present in the following format:
{
"errorCode": "com.redis.error",
"errorMsg": "Something went wrong"
}
Content type
Image
Digest
Size
2.1 MB
Last updated
over 5 years ago
docker pull jkizo/redis