collector

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package collector contains the mempool collector service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(opts *CollectorOpts)

Start kicks off all the service components in the background

Types

type BlxNodeConnection

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

func NewBlxNodeConnection

func NewBlxNodeConnection(opts BlxNodeOpts, txC chan TxIn) *BlxNodeConnection

func (*BlxNodeConnection) Start

func (nc *BlxNodeConnection) Start()

type BlxNodeOpts

type BlxNodeOpts struct {
	Log        *zap.SugaredLogger
	AuthHeader string
	IsEden     bool
	URL        string // optional override, default: blxDefaultURL
	SourceTag  string // optional override, default: "blx" (common.BloxrouteTag)
}

type ChainboundNodeConnection

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

func NewChainboundNodeConnection

func NewChainboundNodeConnection(opts ChainboundNodeOpts, txC chan TxIn) *ChainboundNodeConnection

func (*ChainboundNodeConnection) Start

func (cbc *ChainboundNodeConnection) Start()

type ChainboundNodeOpts

type ChainboundNodeOpts struct {
	Log       *zap.SugaredLogger
	APIKey    string
	URL       string // optional override, default: ChainboundDefaultURL
	SourceTag string // optional override, default: "Chainbound"
}

type CollectorOpts

type CollectorOpts struct {
	Log                *zap.SugaredLogger
	UID                string
	Nodes              []string
	OutDir             string
	WriteSourcelog     bool
	BloxrouteAuthToken string
	ChainboundAPIKey   string
}

type NodeConnection

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

func NewNodeConnection

func NewNodeConnection(log *zap.SugaredLogger, nodeURI string, txC chan TxIn) *NodeConnection

func (*NodeConnection) Start

func (nc *NodeConnection) Start()

type TxDetail

type TxDetail struct {
	Timestamp int64  `json:"timestamp"`
	Hash      string `json:"hash"`
	RawTx     string `json:"rawTx"`
}

type TxIn

type TxIn struct {
	T      time.Time
	Tx     *types.Transaction
	Source string
}

type TxProcessor

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

func NewTxProcessor

func NewTxProcessor(log *zap.SugaredLogger, outDir, uid string, writeSourcelog bool) *TxProcessor

func (*TxProcessor) Start

func (p *TxProcessor) Start()

Jump to

Keyboard shortcuts

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