wsmessage

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

README

gofmt status golint status automated test coverage

sendWSMessage

This activity sends a message to a WebSocket enabled server like TIBCO eFTL.

Installation

flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/sendwsmessage

Schema

Inputs and Outputs:

{
"inputs":[
    {
      "name": "Server",
      "type": "string",
      "value": ""
    },
    {
      "name": "Channel",
      "type": "string",
      "value": ""
    },
    {
      "name": "Destination",
      "type": "string",
      "value": ""
    },
    {
      "name": "Message",
      "type": "string",
      "value": ""
    },
    {
      "name": "Username",
      "type": "string",
      "value": ""
    },
    {
      "name": "Password",
      "type": "string",
      "value": ""
    }
  ],
  "outputs": [
    {
      "name": "output",
      "type": "string"
    }
  ]
}

Settings

Setting Description
Server The WebSocket server to connect to (e.g. localhost:9191)
Channel The channel to send the message to (e.g. /channel)
Destination The destination to send the message to (e.g. sample)
Message The actual message to send
Username The username to connect to the WebSocket server (e.g. user)
Password The password to connect to the WebSocket server (e.g. user)

Configuration Examples

The below configuration would connect to a WebSocket server based on TIBCO eFTL and send a message saying Hello World

      {
        "id": 2,
        "name": "Send a message to a WebSocket server",
        "type": 1,
        "activityType": "sendWSMessage",
        "attributes": [
          {
            "name": "Server",
            "value": "localhost:9191",
            "type": "string"
          },
          {
            "name": "Channel",
            "value": "/channel",
            "type": "string"
          },
          {
            "name": "Destination",
            "value": "sample",
            "type": "string"
          },
          {
            "name": "Message",
            "value": "Hello World",
            "type": "string"
          },
          {
            "name": "Username",
            "value": "user",
            "type": "string"
          },
          {
            "name": "Password",
            "value": "password",
            "type": "string"
          }
        ]
      }

Contributors

Leon Stigter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new WsMsgActivity

Types

type WsMsgActivity

type WsMsgActivity struct {
	// contains filtered or unexported fields
}

WsMsgActivity is a stub for your Activity implementation

func (*WsMsgActivity) Eval

func (a *WsMsgActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval - Sends a message to a WebSocket enabled server like TIBCO eFTL

func (*WsMsgActivity) Metadata

func (a *WsMsgActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL