reportingclient

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Disabled      bool   `mapstructure:"disabled"`
	BaseURL       string `mapstructure:"base_url"`
	Name          string `mapstructure:"name"`
	WebsiteURL    string `mapstructure:"website_url"`
	IndexerAPIURL string `mapstructure:"indexer_api_url"`
}

type ReportingClient

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

func New

func New(config Config) (*ReportingClient, error)

func (*ReportingClient) SubmitBlockReport

func (r *ReportingClient) SubmitBlockReport(ctx context.Context, payload SubmitBlockReportPayload) error

func (*ReportingClient) SubmitNodeReport

func (r *ReportingClient) SubmitNodeReport(ctx context.Context, module string, network common.Network) error

type SubmitBlockReportPayload

type SubmitBlockReportPayload struct {
	Type                string         `json:"type"`
	ClientVersion       string         `json:"clientVersion"`
	DBVersion           int            `json:"dbVersion"`
	EventHashVersion    int            `json:"eventHashVersion"`
	Network             common.Network `json:"network"`
	BlockHeight         uint64         `json:"blockHeight"`
	BlockHash           chainhash.Hash `json:"blockHash"`
	EventHash           chainhash.Hash `json:"eventHash"`
	CumulativeEventHash chainhash.Hash `json:"cumulativeEventHash"`
}

type SubmitNodeReportPayload

type SubmitNodeReportPayload struct {
	Name          string         `json:"name"`
	Type          string         `json:"type"`
	Network       common.Network `json:"network"`
	WebsiteURL    string         `json:"websiteURL,omitempty"`
	IndexerAPIURL string         `json:"indexerAPIURL,omitempty"`
}

Jump to

Keyboard shortcuts

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