Documentation
¶
Index ¶
- Constants
- Variables
- type DataNodeClient
- func (c *DataNodeClient) GetNetworkHistorySegments(fromBlock, toBlock int64) ([]*NetworkHistorySegment, error)
- func (c *DataNodeClient) GetStatistics(ctx context.Context) (*entities.Statistics, error)
- func (c *DataNodeClient) GetStatisticsWithHeaders(ctx context.Context, wantedHeaders []string) (*entities.Statistics, map[string]string, error)
- func (c *DataNodeClient) IsHealthy(ctx context.Context) (bool, error)
- type NetworkHistorySegment
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(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)
type NetworkHistorySegment ¶
Click to show internal directories.
Click to hide internal directories.