rpc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventCompleteProposal    = "CompleteProposal"
	EventNewBlock            = "NewBlock"
	EventNewRound            = "NewRound"
	EventRoundState          = "RoundState"
	EventValidatorSetUpdates = "ValidatorSetUpdates"
	EventVote                = "Vote"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Client *http.HTTP
	// contains filtered or unexported fields
}

func NewNode

func NewNode(client *http.HTTP, options ...NodeOption) *Node

func (*Node) ChainID

func (n *Node) ChainID() string

func (*Node) Endpoint added in v0.10.0

func (n *Node) Endpoint() string

func (*Node) IsRunning

func (n *Node) IsRunning() bool

func (*Node) IsSynced

func (n *Node) IsSynced() bool

func (*Node) OnEvent added in v0.6.0

func (n *Node) OnEvent(eventType string, callback OnNodeEvent)

func (*Node) OnStart added in v0.5.0

func (n *Node) OnStart(callback OnNodeStart)

func (*Node) OnStatus added in v0.5.0

func (n *Node) OnStatus(callback OnNodeStatus)

func (*Node) Redacted added in v0.10.0

func (n *Node) Redacted() string

func (*Node) Start

func (n *Node) Start(ctx context.Context) error

func (*Node) Started

func (n *Node) Started() chan struct{}

func (*Node) Status added in v0.5.0

func (n *Node) Status(ctx context.Context) (*ctypes.ResultStatus, error)

func (*Node) Stop

func (n *Node) Stop(ctx context.Context) error

func (*Node) Subscribe

func (n *Node) Subscribe(ctx context.Context, eventType string) (<-chan ctypes.ResultEvent, error)

type NodeOption

type NodeOption func(*Node)

type OnNodeEvent added in v0.6.0

type OnNodeEvent func(ctx context.Context, n *Node, event *ctypes.ResultEvent) error

type OnNodeStart

type OnNodeStart func(ctx context.Context, n *Node) error

type OnNodeStatus

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

type Pool

type Pool struct {
	ChainID string
	Nodes   []*Node
	// contains filtered or unexported fields
}

func NewPool

func NewPool(chainID string, nodes []*Node) *Pool

func (*Pool) GetSyncedNode

func (p *Pool) GetSyncedNode() *Node

func (*Pool) Start

func (p *Pool) Start(ctx context.Context) error

func (*Pool) Started

func (p *Pool) Started() chan struct{}

func (*Pool) Stop

func (p *Pool) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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