datanode

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DataNodeHeightHeader = "x-block-height"

Variables

View Source
var (
	ErrHttpCallError            = errors.New("error during http call")
	ErrMissingOrInvalidResponse = errors.New("missing some information from the data-node response")
	ErrTimeGapTooBig            = errors.New("time gap between core and data-node is too big")
	ErrBlocksGapTooBig          = errors.New("blocks gap between core and data-node is too big")
)

Functions

This section is empty.

Types

type DataNodeClient

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

func NewDataNodeClient

func NewDataNodeClient(apiURL string) *DataNodeClient

func (*DataNodeClient) GetNetworkHistorySegments

func (c *DataNodeClient) GetNetworkHistorySegments(ctx context.Context, fromBlock, toBlock int64) ([]*NetworkHistorySegment, error)

func (*DataNodeClient) GetStatistics added in v0.13.0

func (c *DataNodeClient) GetStatistics(ctx context.Context) (*entities.Statistics, error)

func (*DataNodeClient) GetStatisticsWithHeaders added in v0.13.0

func (c *DataNodeClient) GetStatisticsWithHeaders(ctx context.Context, wantedHeaders []string) (*entities.Statistics, map[string]string, error)

func (*DataNodeClient) IsHealthy added in v0.13.0

func (c *DataNodeClient) IsHealthy(ctx context.Context) (bool, error)

type NetworkHistorySegment

type NetworkHistorySegment struct {
	Height    int64  `db:"height"`
	SegmentId string `db:"segment_id"`
	DataNode  string `db:"data_node"`
}

Jump to

Keyboard shortcuts

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