node

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package node contains structs/interfaces for bsp-agent node, it aggregates all the services and orchestrates processing of redis stream (or websocket) encoded (rlp for evm) block-replica messages created by bsp-geth

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentNode

type AgentNode interface {
	NodeChainType() ChainType
	Start(_ context.Context)
	StopProcessing()
	Close()
}

AgentNode defines the interface to interact with the bsp-agent node. The lifecycle of an AgentNode goes from: start (processing) -> stop (processing) -> close.

func NewAgentNode

func NewAgentNode(chainType ChainType, aconfig *config.AgentConfig) AgentNode

NewAgentNode creates a new agent node of given ChainType, and config. This also sets up the internal services in order for the node to operate. Typically one can `Start()` processing after creating node via this method.

type ChainType

type ChainType string

ChainType ChainType is the blockchain on which the agent is configured to run. Current allowed values are "ethereum" and "elrond"

const (
	// Ethereum ChainType
	Ethereum ChainType = "ethereum"
	// Elrond ChainType
	Elrond ChainType = "elrond"
)

Jump to

Keyboard shortcuts

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