mercurial

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 4 Imported by: 0

README

Mercurial

Mercurial custom node implementations for FlowBase A Flow-based Programming (FBP) micro-framework for Go (Golang).

The aim of FlowBase, as opposed to being a full-blown framework, is to provide just enough functionality on top of the existing FBP-like primives in Golang (channels with bounded buffers, asynchronous go-routines), to enable developing data processing applications with it. Thus the term "FBP micro-framework".

Input Nodes

TCP Server in

Provides a choice of TCP inputs. Accept incoming tcp client connections.

  • TCPServerConfig
Configuration
Process Name Name of the node process
Address TCP Bind address example: (0.0.0.0:3000)
Dead Line Deadline expressed in seconds
NSQ Subscriber

Provides a choice of NSQ input subscriber.

  • SubscriberConfig
Configuration
Process Name Name of the node process
Url NSQ bind tcp/ip address
Dead Line Deadline expressed in seconds
NSQConfig NSQ configuration
Channel channel name
Topic topic name

Output Nodes

Data WareHouse Minio

MinIO put node. Uploads content to an MinIO bucket. The bucket name can be specified in the node bucket property or in the msg.bucket property.

WebSocket

Documentation

Overview

Copyright (c) 2023 Albert Espín albert@espin.ovh

Copyright (c) 2023 Albert Espín albert@espin.ovh

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAMessage        error = errors.New("error data received not a valid message")
	ErrPayloadMismatch    error = errors.New("message payload mismatch")
	ErrMessageTypeUnknown error = errors.New("message type unknown")
)
View Source
var (
	// Package is filled at linking time
	Package = "git.espin.ovh/mercurial"
	// Version holds the complete version number. Filled in at linking time.
	Version = "0.0.1-beta"
	// Revision is filled with the VCS (e.g. git) revision being used to build
	// the program at linking time.
	Revision = ""
	// GoVersion is Go tree's version.
	GoVersion = runtime.Version()
)

Functions

func RandomString

func RandomString(n int) string

RandomString returns a random string of alphanumeric characters

Types

type Message

type Message struct {
	Tags tags `json:"tags"`

	Payload any `json:"payload"`
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(payload any) *Message

func (*Message) GetID

func (m *Message) GetID() string

func (*Message) GetPayload

func (m *Message) GetPayload() any

func (*Message) GetTag

func (m *Message) GetTag(k string) any

func (*Message) GetTags

func (m *Message) GetTags() tags

func (*Message) SetPayload

func (m *Message) SetPayload(payload any)

func (*Message) SetTag

func (m *Message) SetTag(k string, v any)

Directories

Path Synopsis
components

Jump to

Keyboard shortcuts

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