node

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node represents a relay node.

func Initialize

func Initialize(
	ctx context.Context,
	config *config.Config,
	btcChain btc.Handle,
	hostChain chain.Handle,
) *Node

Initialize initializes the relay node.

TODO: This function will be probably the right place to handle relay auctions

which will require starting and stopping the headers relay.

func (*Node) Stats

func (n *Node) Stats() Stats

Stats returns relay node statistics.

type Stats

type Stats interface {
	// HeadersRelayActive returns whether the headers relay process is active.
	HeadersRelayActive() bool

	// HeadersRelayErrors returns the total number of headers relay errors.
	HeadersRelayErrors() int

	// UniqueHeadersPulled returns the number of unique headers pulled during
	// the relay node lifetime.
	UniqueHeadersPulled() int

	// UniqueHeadersPushed returns the number of unique headers pushed during
	// the relay node lifetime.
	UniqueHeadersPushed() int
}

Stats exposes statistics of the relay node.

Jump to

Keyboard shortcuts

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