stats

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(node, chainId, operator, host, secret string, db *gorm.DB)

func SendErrorToStats

func SendErrorToStats(listener bridgeCore.Listener, err error)

Types

type BridgeInfo

type BridgeInfo struct {
	Node           string            `json:"node"`
	Operator       string            `json:"bridgeOperatorAddress"`
	Version        string            `json:"version"`
	LastError      map[string]string `json:"lastError"`
	ProcessedBlock map[string]uint64 `json:"processedBlock"`
	PendingTasks   int               `json:"pendingTasks"`
	FailedTasks    int               `json:"failedTasks"`
}

type NodeInfo

type NodeInfo struct {
	Organization  string `json:"organization,omitempty" mapstructure:"organization"`
	Coinbase      string `json:"coinbase" mapstructure:"coinbase"`
	Name          string `json:"name" mapstructure:"name"`
	Node          string `json:"node" mapstructure:"node"`
	Port          int    `json:"port" mapstructure:"port"`
	Network       string `json:"net" mapstructure:"net"`
	Protocol      string `json:"protocol" mapstructure:"protocol"`
	API           string `json:"api" mapstructure:"api"`
	Os            string `json:"os" mapstructure:"os"`
	OsVer         string `json:"os_v" mapstructure:"os_v"`
	Client        string `json:"client" mapstructure:"client"`
	History       bool   `json:"canUpdateHistory" mapstructure:"canUpdateHistory"`
	Operator      string `json:"operator" mapstructure:"operator"`
	BridgeVersion string `json:"bridgeVersion" mapstructure:"bridgeVersion"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}
var BridgeStats *Service

func (*Service) SendError

func (s *Service) SendError(listener, err string)

func (*Service) SendProcessedBlock

func (s *Service) SendProcessedBlock(listener string, block uint64)

func (*Service) Start

func (s *Service) Start()

Start loop keeps trying to connect to ronin stats server, reporting bridge stats.

func (*Service) Stop

func (s *Service) Stop()

Jump to

Keyboard shortcuts

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