package
0.0.0-20200821104852-f76c6d292a95
Repository: https://github.com/jvanderl/flogo-components.git
Documentation: pkg.go.dev

# README

Interact with Redis

This activity provides your flogo application the ability to interact with a Redis keyspace.

Installation

flogo install github.com/jvanderl/flogo-components/activity/redis

Link for flogo web:

https://github.com/jvanderl/flogo-components/activity/redis

Schema

Inputs and Outputs:

{
  "input":[
   {
      "name": "server",
      "type": "string",
      "value": "localhost:6379"
    },
    {
      "name": "password",
      "type": "string"
    },
    {
      "name": "database",
      "type": "integer"
    },
    {
      "name": "operation",
      "type": "string",
      "required": true,
      "allowed" : ["DEL", "GET", "KEYS", "PING", "SET"]
    },
    {
      "name": "key",
      "type": "string"
    },
    {
      "name": "value",
      "type": "string"
    }
  ],
  "output": [
    {
      "name": "result",
      "type": "string"
    }
  ]
}

Settings

SettingDescription
serverthe address of the redis server ([hostname]:[port])
passwordThe Password used when connecting to the redis server
databaseRedis database, default 0
operationcan be "DEL", "GET", "KEYS", "PING", "SET"
keyKey used to interact with redis
valueThe value to write (only applies when operation is "SET")

Configuration Examples

Simple

Configure a task in flow to write "hello world" to a key on redis called "flogo":

{
  "id": 2,
  "name": "Interact with Redis",
  "type": 1,
  "activityType": "redis",
  "attributes": [
    {
      "name": "server",
      "value": "localhost:6379",
      "type": "string"
    },
    {
      "name": "password",
      "value": "",
      "type": "string"
    },
    {
      "name": "database",
      "value": "0",
      "type": "integer"
    },
    {
      "name": "operation",
      "value": "GET",
      "type": "string"
    },
    {
      "name": "key",
      "value": "flogo",
      "type": "string"
    },
    {
      "name": "value",
      "value": "Hello World",
      "type": "string"
    }
  ]
}

# Functions

NewActivity creates a new AppActivity.

# Structs

MyActivity is a stub for your Activity implementation.