robot

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: GPL-3.0 Imports: 24 Imported by: 1

README

robot

Robot of cortex full node

How to use it ?

Make sure config the right cortex RPC service endpoint

go install github.com/CortexFoundation/robot/cmd/robot@latest
go run cmd/robot/main.go
image

Documentation

Index

Constants

View Source
const (
	SRV_MODEL  = 0
	SRV_RECORD = 99
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IMonitor added in v1.0.4

type IMonitor interface {
	CurrentNumber() uint64
	ID() uint64
	DB() *backend.ChainDB
	Callback() chan any

	Stop() error
	Start() error
	SwitchService(srv int) error
}

type Monitor

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

Monitor observes the data changes on the blockchain and synchronizes. cl for ipc/rpc communication, dl for download manager, and fs for data storage.

func New

func New(flag *params.Config, cache, compress, listen bool, callback chan any) (m *Monitor, err error)

NewMonitor creates a new instance of monitor. Once Ipcpath is settle, this method prefers to build socket connection in order to get higher communicating performance. IpcPath is unavailable on windows. func New(flag *params.Config, cache, compress, listen bool, fs *backend.ChainDB, tMana *backend.TorrentManager, callback chan any) (*Monitor, error) {

func (*Monitor) Callback

func (m *Monitor) Callback() chan any

func (*Monitor) CurrentNumber

func (m *Monitor) CurrentNumber() uint64

func (*Monitor) DB

func (m *Monitor) DB() *backend.ChainDB

func (*Monitor) ID

func (m *Monitor) ID() uint64

func (*Monitor) Start

func (m *Monitor) Start() error

Start ... start ListenOn on the rpc port of a blockchain full node

func (*Monitor) Stop

func (m *Monitor) Stop() error

func (*Monitor) SwitchService added in v1.0.1

func (m *Monitor) SwitchService(srv int) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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