Documentation ¶
Overview ¶
Package adminjson defines the admin service's method names, request objects, and response objects.
Index ¶
- Constants
- type ApproveRequest
- type ApproveResolutionRequest
- type CreateResolutionRequest
- type GetConfigRequest
- type GetConfigResponse
- type HealthResponse
- type JoinRequest
- type JoinStatusRequest
- type JoinStatusResponse
- type LeaveRequest
- type ListJoinRequestsRequest
- type ListJoinRequestsResponse
- type ListPeersRequest
- type ListPeersResponse
- type ListValidatorsRequest
- type ListValidatorsResponse
- type NodeInfo
- type PeerRequest
- type PeerResponse
- type PeersRequest
- type PeersResponse
- type PendingJoin
- type RemoveRequest
- type ResolutionStatusRequest
- type ResolutionStatusResponse
- type StatusRequest
- type StatusResponse
- type SyncInfo
- type Validator
Constants ¶
View Source
const ( MethodHealth jsonrpc.Method = "admin.health" 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" MethodAddPeer jsonrpc.Method = "admin.add_peer" MethodRemovePeer jsonrpc.Method = "admin.remove_peer" MethodListPeers jsonrpc.Method = "admin.list_peers" MethodCreateResolution jsonrpc.Method = "admin.create_resolution" MethodApproveResolution jsonrpc.Method = "admin.approve_resolution" MethodResolutionStatus jsonrpc.Method = "admin.resolution_status" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApproveRequest ¶
type ApproveRequest struct {
PubKey []byte `json:"pubkey"`
}
type ApproveResolutionRequest ¶ added in v0.3.0
type CreateResolutionRequest ¶ added in v0.3.0
type GetConfigRequest ¶
type GetConfigRequest struct{}
type GetConfigResponse ¶
type GetConfigResponse struct {
Config []byte `json:"config,omitempty"`
}
type HealthResponse ¶ added in v0.3.0
type HealthResponse struct { Version string `json:"version"` Healthy bool `json:"healthy"` Validator bool `json:"is_validator"` PubKey types.HexBytes `json:"pubkey"` NumValidators int `json:"num_validators"` }
HealthResponse is the health check response.
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 ListPeersRequest ¶ added in v0.3.0
type ListPeersRequest struct{}
type ListPeersResponse ¶ added in v0.3.0
type ListPeersResponse struct {
Peers []string `json:"peers,omitempty"`
}
List of peers in the node's whitelist. These are the peers the node will accept connections from.
type ListValidatorsRequest ¶
type ListValidatorsRequest struct{}
type ListValidatorsResponse ¶
type ListValidatorsResponse struct {
Validators []*Validator `json:"validators,omitempty"`
}
type NodeInfo ¶
type NodeInfo = adminTypes.NodeInfo
type PeerRequest ¶ added in v0.3.0
type PeerRequest struct {
PeerID string `json:"peerid"`
}
type PeerResponse ¶ added in v0.3.0
type PeerResponse struct{}
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 ResolutionStatusRequest ¶ added in v0.3.0
type ResolutionStatusResponse ¶ added in v0.3.0
type ResolutionStatusResponse struct {
Status *types.PendingResolution `json:"status,omitempty"`
}
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"` Migration *types.MigrationState `json:"migration,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"` // epoch *milliseconds* Syncing bool `json:"syncing,omitempty"` }
SyncInfo is modified from adminTypes to have BestBlockTime be a unix epoch in milliseconds.
Click to show internal directories.
Click to hide internal directories.