Documentation

Index

Constants

View Source
const (
	// Status and healthcheck
	Status          = "status"
	Network         = "network"
	NetworkRegistry = "network/registry"

	// Accounts
	Accounts        = "accounts"
	Account         = "account"
	Storage         = "storage"
	DumpStorage     = "dump_storage"
	GetAccountHuman = "account_human"
	AccountStats    = "account_stats"

	// Names
	Name  = "name"
	Names = "names"

	// Blockchain
	Genesis = "genesis"
	ChainID = "chain_id"
	Block   = "block"
	Blocks  = "blocks"

	// Consensus
	UnconfirmedTxs = "unconfirmed_txs"
	Validators     = "validators"
	Consensus      = "consensus"
)

    Method names

    Variables

    This section is empty.

    Functions

    func GetRoutes

    func GetRoutes(service *rpc.Service) map[string]*server.RPCFunc

      The methods below all get mounted at the info server address (specified in config at RPC/Info) in the following form:

      http://<info-host>:<info-port>/<name>?<param1>=<value1>&<param2>=<value2>[&...]

      For example: http://0.0.0.0:26658/status?block_time_within=10m&block_seen_time_within=1h http://0.0.0.0:26658/names?regex=<regular expression to match name>

      They keys in the route map below are the endpoint name, and the comma separated values are the url query params

      They info endpoint also all be called with a JSON-RPC payload like:

      curl -X POST -d '{"method": "names", "id": "foo", "params": ["loves"]}' http://0.0.0.0:26658

      func StartServer

      func StartServer(service *rpc.Service, pattern string, listener net.Listener, logger *logging.Logger) (*http.Server, error)

      Types

      This section is empty.

      Directories

      Path Synopsis