adminjson

package
v0.8.3-preview.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package adminjson defines the admin service's method names, request objects, and response objects.

Index

Constants

View Source
const (
	MethodVersion       jsonrpc.Method = "admin.version"
	MethodStatus        jsonrpc.Method = "admin.status"
	MethodPeers         jsonrpc.Method = "admin.peers"
	MethodConfig        jsonrpc.Method = "admin.config"
	MethodValApprove    jsonrpc.Method = "admin.val_approve"
	MethodValJoin       jsonrpc.Method = "admin.val_join"
	MethodValRemove     jsonrpc.Method = "admin.val_remove"
	MethodValLeave      jsonrpc.Method = "admin.val_leave"
	MethodValJoinStatus jsonrpc.Method = "admin.val_join_status"
	MethodValList       jsonrpc.Method = "admin.val_list"
	MethodValListJoins  jsonrpc.Method = "admin.val_list_joins"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveRequest

type ApproveRequest struct {
	PubKey []byte `json:"pubkey"`
}

type GetConfigRequest

type GetConfigRequest struct{}

type GetConfigResponse

type GetConfigResponse struct {
	Config []byte `json:"config,omitempty"`
}

type JoinRequest

type JoinRequest struct{}

type JoinStatusRequest

type JoinStatusRequest struct {
	PubKey []byte `json:"pubkey"`
}

type JoinStatusResponse

type JoinStatusResponse struct {
	JoinRequest *PendingJoin `json:"join_request,omitempty"`
}

type LeaveRequest

type LeaveRequest struct{}

type ListJoinRequestsRequest

type ListJoinRequestsRequest struct{}

type ListJoinRequestsResponse

type ListJoinRequestsResponse struct {
	JoinRequests []*PendingJoin `json:"join_requests,omitempty"`
}

type ListValidatorsRequest

type ListValidatorsRequest struct{}

type ListValidatorsResponse

type ListValidatorsResponse struct {
	Validators []*Validator `json:"validators,omitempty"`
}

type NodeInfo

type NodeInfo = adminTypes.NodeInfo

type PeersRequest

type PeersRequest struct{}

type PeersResponse

type PeersResponse struct {
	Peers []*adminTypes.PeerInfo `json:"peers"`
}

type PendingJoin

type PendingJoin = types.JoinRequest

type RemoveRequest

type RemoveRequest struct {
	PubKey []byte `json:"pubkey"`
}

type StatusRequest

type StatusRequest struct{}

type StatusResponse

type StatusResponse struct {
	Node      *NodeInfo  `json:"node,omitempty"`
	Sync      *SyncInfo  `json:"sync,omitempty"`
	Validator *Validator `json:"validator,omitempty"`
}

type SyncInfo

type SyncInfo struct {
	AppHash         string `json:"app_hash,omitempty"`
	BestBlockHash   string `json:"best_block_hash,omitempty"`
	BestBlockHeight int64  `json:"best_block_height,omitempty"`
	BestBlockTime   int64  `json:"best_block_time,omitempty"` // duped for this...
	Syncing         bool   `json:"syncing,omitempty"`
}

SyncInfo is modified from adminTypes to have BestBlockTime be a unix epoch in milliseconds.

type Validator

type Validator = types.Validator

type SyncInfo = adminTypes.SyncInfo type Validator = adminTypes.ValidatorInfo

Jump to

Keyboard shortcuts

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