Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Error is the rpc system error code. Error int64 = 2000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Health ¶
type Health struct { // Peers is the number of connected peers to the node. Peers uint32 // IsSyncing returns true if the node is currently syncing. IsSyncing bool }
Health is the data returned by the Health api.
type Info ¶
type Info struct { // Name is the implementation name. Name string // Version is the implementation version. Version string // ChainName is the name of the chain. ChainName string // Properties are the custom set of properties defined in the chain spec. Properties Properties }
Info is the node's static details
type Properties ¶
type Properties map[string]interface{}
Properties is the struct returned by the properties api.
type ServiceInterface ¶
type ServiceInterface interface { // Name returns the node's implementation name. Name(args rpctypes.NilArgs, response *string) error // Version returns the node's version. The result should be a semvar. Version(args rpctypes.NilArgs, response *string) error // Chain returns the node's chain type. Chain(args rpctypes.NilArgs, response *string) error // Properties returns the node's properties. Properties(args rpctypes.NilArgs, response *Properties) error // Health returns the health status of the node. // // Node is considered healthy if it is: // - connected to some peers (unless running in dev mode) // - not performing a major sync Health(args rpctypes.NilArgs, response *Health) error }
ServiceInterface describes the methods performed by the system rpc service
Click to show internal directories.
Click to hide internal directories.