Sign inSign up

westwind027/redis

By westwind027

•Updated over 3 years ago

Image
0

522

westwind027/redis repository overview

⁠Version
  • v1 RawVersion
  • v2 Fix Set Value which contain = character
  • v3 Add Set TTL support

⁠Redis

The following container can do the below

  • Gets a specific key's value
  • Sets an array of KEY=VALUE strings

⁠Direktiv

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

⁠Get
input:
  method: "get"
  addr: "localhost:6379"
  password: ""
  db: 0
  values: "TEST"
⁠Set
input:
  method: "set"
  addr: "localhost:6379"
  password: ""
  db: 0
  values: 
    - "TEST=TEST2"
    - "TEST2=TEST3"
  ttl: 0

⁠Output

⁠Set

If the action is successful, the redis should have stored each key and value. No output will be returned to the user.

⁠Get

If the action is successful, the output will be a json object like the following.

{
    "value": "TEST2"
}

⁠Error

In the case that an error is encountered, it will present in the following format:

{
    "errorCode": "com.redis.error",
    "errorMsg": "Something went wrong"
}

Tag summary

Content type

Image

Digest

sha256:adf707b3f…

Size

2.4 MB

Last updated

over 3 years ago

docker pull westwind027/redis