The following container can do the below
An example workflow of using the container on Direktiv.
id: redis
functions:
- id: redis-op
image: direktiv/redis:v1
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"
input:
method: "get"
addr: "localhost:6379"
password: ""
db: 0
values: "TEST"
input:
method: "set"
addr: "localhost:6379"
password: ""
db: 0
values:
- "TEST=TEST2"
- "TEST2=TEST3"
ttl: 0
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
sha256:adf707b3f…
Size
2.4 MB
Last updated
over 3 years ago
docker pull westwind027/redis