txstream

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

README

TXStream plugin

Purpose

The TXStream plugin exposes a TCP port for clients to connect and subscribe to real-time notifications on confirmed transactions targeted to specific addresses. It is used by Wasp nodes to be notified about incoming requests and updates on a given chain, but it provides a generic API, not tied to ISCP or Wasp.

Protocol

The TXStream plugin uses a duplex, binary protocol over TCP. Messaging is completely asynchronous: neither party is waiting for the response or confirmation after sending a message to the other party. Even if a message is for example a request to fetch a transaction, the client receives the response asynchronously. This also means that messages may be lost without notification (e.g. if the connection drops before receiving the reply).

The list and description of messages in the protocol can be found in packages/txstream/msg.go.

Configuration

The TXStream plugin supports the following configuration value in config.json:

"txstream": {
  "bindAddress": ":5000",
}
  • txstream.bindAddress specifies the TCP address for listening to new connections.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Parameters = &ParametersDefinition{}

Parameters contains the configuration used by the txstream plugin

Functions

func Plugin

func Plugin() *node.Plugin

Plugin returns the plugin instance

Types

type ParametersDefinition added in v0.7.4

type ParametersDefinition struct {
	// BindAddress defines the bind address for the txstream server.
	BindAddress string `default:"0.0.0.0:5000" usage:"the bind address for the txstream plugin"`
}

ParametersDefinition contains the definition of the parameters used by the txstream plugin.

Jump to

Keyboard shortcuts

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