info

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(log logging.Logger, version version.Version, nodeID ids.ShortID, networkID uint32, chainManager chains.Manager, peers network.Network) *common.HTTPHandler

NewService returns a new admin API service

Types

type GetBlockchainIDArgs

type GetBlockchainIDArgs struct {
	Alias string `json:"alias"`
}

GetBlockchainIDArgs are the arguments for calling GetBlockchainID

type GetBlockchainIDReply

type GetBlockchainIDReply struct {
	BlockchainID string `json:"blockchainID"`
}

GetBlockchainIDReply are the results from calling GetBlockchainID

type GetNetworkIDReply

type GetNetworkIDReply struct {
	NetworkID cjson.Uint32 `json:"networkID"`
}

GetNetworkIDReply are the results from calling GetNetworkID

type GetNetworkNameReply

type GetNetworkNameReply struct {
	NetworkName string `json:"networkName"`
}

GetNetworkNameReply is the result from calling GetNetworkName

type GetNodeIDReply

type GetNodeIDReply struct {
	NodeID ids.ShortID `json:"nodeID"`
}

GetNodeIDReply are the results from calling GetNodeID

type GetNodeVersionReply

type GetNodeVersionReply struct {
	Version string `json:"version"`
}

GetNodeVersionReply are the results from calling GetNodeVersion

type Info

type Info struct {
	// contains filtered or unexported fields
}

Info is the API service for unprivileged info on a node

func (*Info) GetBlockchainID

func (service *Info) GetBlockchainID(_ *http.Request, args *GetBlockchainIDArgs, reply *GetBlockchainIDReply) error

GetBlockchainID returns the blockchain ID that resolves the alias that was supplied

func (*Info) GetNetworkID

func (service *Info) GetNetworkID(_ *http.Request, _ *struct{}, reply *GetNetworkIDReply) error

GetNetworkID returns the network ID this node is running on

func (*Info) GetNetworkName

func (service *Info) GetNetworkName(_ *http.Request, _ *struct{}, reply *GetNetworkNameReply) error

GetNetworkName returns the network name this node is running on

func (*Info) GetNodeID

func (service *Info) GetNodeID(_ *http.Request, _ *struct{}, reply *GetNodeIDReply) error

GetNodeID returns the node ID of this node

func (*Info) GetNodeVersion

func (service *Info) GetNodeVersion(_ *http.Request, _ *struct{}, reply *GetNodeVersionReply) error

GetNodeVersion returns the version this node is running

func (*Info) Peers

func (service *Info) Peers(_ *http.Request, _ *struct{}, reply *PeersReply) error

Peers returns the list of current validators

type PeersReply

type PeersReply struct {
	Peers []network.PeerID `json:"peers"`
}

PeersReply are the results from calling Peers

Jump to

Keyboard shortcuts

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