system

package
v0.0.0-...-f5f0bdb Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

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 Service

type Service struct{}

Service implements the system service interface

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

Jump to

Keyboard shortcuts

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