stats

package
v0.0.0-...-eab5219 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStats

type BlockStats struct {
	Index               types.ChainIndex `json:"index"`
	TotalSupply         types.Currency   `json:"totalSupply"`
	CirculatingSupply   types.Currency   `json:"circulatingSupply"`
	SiafundPool         types.Currency   `json:"siafundPool"`
	ActiveContractCount uint64           `json:"activeContractCount"`
}

BlockStats aggregates stats as of a given block.

type ConsensusSubscriber

type ConsensusSubscriber interface {
	ConsensusSetSubscribe(modules.ConsensusSetSubscriber, modules.ConsensusChangeID, <-chan struct{}) error
}

A ConsensusSubscriber subscribes to consensus changes.

type Provider

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

A Provider indexes stats on the current state of the Sia network.

func NewProvider

func NewProvider(cs ConsensusSubscriber, log *zap.Logger) (*Provider, error)

NewProvider creates a new Provider.

func (*Provider) ProcessConsensusChange

func (p *Provider) ProcessConsensusChange(cc modules.ConsensusChange)

ProcessConsensusChange implements modules.ConsensusSetSubscriber.

func (*Provider) Stats

func (p *Provider) Stats() BlockStats

Jump to

Keyboard shortcuts

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