Documentation
¶
Index ¶
- type Client
- func (c *Client) GetHealth() (string, error)
- func (c *Client) GetIdentity() (string, error)
- func (c *Client) GetNodeWithIdentityPublicKey(identityPublicKey string) (found bool, node *clusterNodeResult, err error)
- func (c *Client) GetVersion() (string, error)
- func (c *Client) GetVoteAccounts() (*VoteAccounts, error)
- type JSONRPCRequest
- type JSONRPCResponse
- type RPCError
- type ValidatorState
- type VoteAccount
- type VoteAccounts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an RPC client for communicating with the validator
func (*Client) GetIdentity ¶
GetIdentity gets the validator's identity public key (public method)
func (*Client) GetNodeWithIdentityPublicKey ¶ added in v0.1.12
func (c *Client) GetNodeWithIdentityPublicKey(identityPublicKey string) (found bool, node *clusterNodeResult, err error)
GetNodeWithIdentityPublicKey gets a validator with the given identity public key
func (*Client) GetVersion ¶
GetVersion gets the validator's version (public method)
func (*Client) GetVoteAccounts ¶ added in v0.1.41
func (c *Client) GetVoteAccounts() (*VoteAccounts, error)
GetVoteAccounts gets current and delinquent vote accounts.
type JSONRPCRequest ¶
type JSONRPCRequest struct {
JSONRPC string `json:"jsonrpc"`
ID int `json:"id"`
Method string `json:"method"`
Params []interface{} `json:"params"`
}
JSONRPCRequest represents a JSON-RPC request
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID int `json:"id"`
Result interface{} `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
JSONRPCResponse represents a JSON-RPC response
type ValidatorState ¶
type ValidatorState struct {
// RunningVersion is the currently running version of the validator
RunningVersion string
// IdentityPubkey is the public key of the validator's identity
IdentityPubkey string
// Role is the role of the validator (active/passive)
Role string
}
ValidatorState represents the current state of the validator
type VoteAccount ¶ added in v0.1.41
type VoteAccount struct {
VotePubkey string `json:"votePubkey"`
NodePubkey string `json:"nodePubkey"`
}
VoteAccount contains the identity association needed for validator role discovery.
type VoteAccounts ¶ added in v0.1.41
type VoteAccounts struct {
Current []VoteAccount `json:"current"`
Delinquent []VoteAccount `json:"delinquent"`
}
VoteAccounts contains current and delinquent vote accounts.