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

# README

Send WebSocket message

This activity allows you to send a message to a WebSocket server.

Installation

flogo add activity github.com/jvanderl/flogo-components/activity/wssend

Link for flogo web:

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

Schema

Inputs and Outputs:

{
"input":[
    {
      "name": "server",
      "type": "string",
      "value": ""
    },
    {
      "name": "channel",
      "type": "string",
      "value": ""
    },
    {
      "name": "message",
      "type": "string",
      "value": ""
    }
  ],
  "output": [
    {
      "name": "output",
      "type": "string"
    }
  ]
}

Settings

SettingRequiredDescription
serverFalseThe WebSocket server to connect to (e.g. localhost:9191)
channelFalseThe channel to send the message to (e.g. /channel)
messageFalseThe message to send

Outputs

OutputDescription
outputA string with the result of the action

Configuration Examples

The below example sends a message Hello World

{
  "id": "wssend",
  "name": "Send WebSocket Message",
  "description": "This activity sends a message to a WebSocket server",
  "activity": {
    "ref": "github.com/jvanderl/flogo-components/activity/wssend",
    "input": {
      "Server": "localhost:9191",
      "Channel": "/channel",
      "Message": "Hello World"
    }
  }
}

# Functions

NewActivity creates a new WsMsgActivity.

# Structs

WsMsgActivity is a stub for your Activity implementation.