watcher

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockInfo added in v0.4.0

type BlockInfo struct {
	ChainID          string
	Height           int64
	Transactions     int
	TotalValidators  int
	SignedValidators int
	ProposerAddress  string
	ValidatorStatus  []ValidatorStatus
}

func NewBlockInfo added in v0.4.0

func NewBlockInfo(block *types.Block, validatorStatus []ValidatorStatus) *BlockInfo

func (*BlockInfo) SignedRatio added in v0.4.0

func (b *BlockInfo) SignedRatio() decimal.Decimal

type BlockWatcher added in v0.4.0

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

func NewBlockWatcher added in v0.4.0

func NewBlockWatcher(validators []TrackedValidator, metrics *metrics.Metrics, writer io.Writer, webhook *webhook.Webhook, customWebhooks []BlockWebhook) *BlockWatcher

func (*BlockWatcher) OnNewBlock added in v0.6.0

func (w *BlockWatcher) OnNewBlock(ctx context.Context, node *rpc.Node, evt *ctypes.ResultEvent) error

func (*BlockWatcher) OnNodeStart added in v0.4.0

func (w *BlockWatcher) OnNodeStart(ctx context.Context, node *rpc.Node) error

func (*BlockWatcher) OnValidatorSetUpdates added in v0.6.0

func (w *BlockWatcher) OnValidatorSetUpdates(ctx context.Context, node *rpc.Node, evt *ctypes.ResultEvent) error

func (*BlockWatcher) Start added in v0.4.0

func (w *BlockWatcher) Start(ctx context.Context) error

type BlockWebhook added in v0.12.0

type BlockWebhook struct {
	Height   int64             `json:"height"`
	Metadata map[string]string `json:"metadata"`
}

type CommissionWatcher added in v0.10.0

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

func NewCommissionsWatcher added in v0.10.0

func NewCommissionsWatcher(validators []TrackedValidator, metrics *metrics.Metrics, pool *rpc.Pool) *CommissionWatcher

func (*CommissionWatcher) Start added in v0.10.0

func (w *CommissionWatcher) Start(ctx context.Context) error

type RankedValidators added in v0.4.0

type RankedValidators []staking.Validator

func (RankedValidators) Len added in v0.4.0

func (p RankedValidators) Len() int

func (RankedValidators) Less added in v0.4.0

func (s RankedValidators) Less(i, j int) bool

func (RankedValidators) Swap added in v0.4.0

func (p RankedValidators) Swap(i, j int)

type SlashingWatcher added in v0.14.0

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

func NewSlashingWatcher added in v0.14.0

func NewSlashingWatcher(metrics *metrics.Metrics, pool *rpc.Pool) *SlashingWatcher

func (*SlashingWatcher) Start added in v0.14.0

func (w *SlashingWatcher) Start(ctx context.Context) error

type StatusWatcher added in v0.4.0

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

func NewStatusWatcher added in v0.4.0

func NewStatusWatcher(chainID string, metrics *metrics.Metrics) *StatusWatcher

func (*StatusWatcher) OnNodeStatus added in v0.4.0

func (w *StatusWatcher) OnNodeStatus(ctx context.Context, n *rpc.Node, status *ctypes.ResultStatus) error

func (*StatusWatcher) Start added in v0.4.0

func (w *StatusWatcher) Start(ctx context.Context) error

type TrackedValidator added in v0.4.0

type TrackedValidator struct {
	Address          string
	Name             string
	Moniker          string
	OperatorAddress  string
	ConsensusAddress string
}

func ParseValidator added in v0.4.0

func ParseValidator(val string) TrackedValidator

func (TrackedValidator) AccountAddress added in v0.5.0

func (t TrackedValidator) AccountAddress() string

type UpgradeWatcher added in v0.5.0

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

func NewUpgradeWatcher added in v0.5.0

func NewUpgradeWatcher(metrics *metrics.Metrics, pool *rpc.Pool, webhook *webhook.Webhook, options UpgradeWatcherOptions) *UpgradeWatcher

func (*UpgradeWatcher) OnNewBlock added in v0.8.0

func (w *UpgradeWatcher) OnNewBlock(ctx context.Context, node *rpc.Node, evt *ctypes.ResultEvent) error

func (*UpgradeWatcher) Start added in v0.5.0

func (w *UpgradeWatcher) Start(ctx context.Context) error

type UpgradeWatcherOptions added in v0.6.0

type UpgradeWatcherOptions struct {
	CheckPendingProposals bool
	GovModuleVersion      string
}

type ValidatorStatus added in v0.4.0

type ValidatorStatus struct {
	Address string
	Label   string
	Bonded  bool
	Signed  bool
	Rank    int
}

type ValidatorsWatcher added in v0.4.0

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

func NewValidatorsWatcher added in v0.4.0

func NewValidatorsWatcher(validators []TrackedValidator, metrics *metrics.Metrics, pool *rpc.Pool, opts ValidatorsWatcherOptions) *ValidatorsWatcher

func (*ValidatorsWatcher) Start added in v0.4.0

func (w *ValidatorsWatcher) Start(ctx context.Context) error

type ValidatorsWatcherOptions added in v0.7.0

type ValidatorsWatcherOptions struct {
	Denom         string
	DenomExponent uint
	NoSlashing    bool
}

type VotesWatcher added in v0.5.0

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

func NewVotesWatcher added in v0.5.0

func NewVotesWatcher(validators []TrackedValidator, metrics *metrics.Metrics, pool *rpc.Pool, options VotesWatcherOptions) *VotesWatcher

func (*VotesWatcher) Start added in v0.5.0

func (w *VotesWatcher) Start(ctx context.Context) error

type VotesWatcherOptions added in v0.9.0

type VotesWatcherOptions struct {
	GovModuleVersion string
}

Jump to

Keyboard shortcuts

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