reportingclient

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

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