Documentation ¶
Index ¶
- func NewService(parameters Parameters, log logging.Logger, chainManager chains.Manager, ...) (*common.HTTPHandler, error)
- type Client
- type GetBlockchainIDArgs
- type GetBlockchainIDReply
- type GetNetworkIDReply
- type GetNetworkNameReply
- type GetNodeIDReply
- type GetNodeIPReply
- type GetNodeVersionReply
- type GetTxFeeResponse
- type GetVMsReply
- type Info
- func (service *Info) GetBlockchainID(_ *http.Request, args *GetBlockchainIDArgs, reply *GetBlockchainIDReply) error
- func (service *Info) GetNetworkID(_ *http.Request, _ *struct{}, reply *GetNetworkIDReply) error
- func (service *Info) GetNetworkName(_ *http.Request, _ *struct{}, reply *GetNetworkNameReply) error
- func (service *Info) GetNodeID(_ *http.Request, _ *struct{}, reply *GetNodeIDReply) error
- func (service *Info) GetNodeIP(_ *http.Request, _ *struct{}, reply *GetNodeIPReply) error
- func (service *Info) GetNodeVersion(_ *http.Request, _ *struct{}, reply *GetNodeVersionReply) error
- func (service *Info) GetTxFee(_ *http.Request, args *struct{}, reply *GetTxFeeResponse) error
- func (service *Info) GetVMs(_ *http.Request, _ *struct{}, reply *GetVMsReply) error
- func (service *Info) IsBootstrapped(_ *http.Request, args *IsBootstrappedArgs, reply *IsBootstrappedResponse) error
- func (service *Info) Peers(_ *http.Request, args *PeersArgs, reply *PeersReply) error
- func (service *Info) Uptime(_ *http.Request, _ *struct{}, reply *UptimeResponse) error
- type IsBootstrappedArgs
- type IsBootstrappedResponse
- type Parameters
- type Peer
- type PeersArgs
- type PeersReply
- type UptimeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService( parameters Parameters, log logging.Logger, chainManager chains.Manager, vmManager vms.Manager, myIP ips.DynamicIPPort, network network.Network, versionParser version.ApplicationParser, validators validators.Set, benchlist benchlist.Manager, ) (*common.HTTPHandler, error)
NewService returns a new admin API service
Types ¶
type Client ¶ added in v1.0.6
type Client interface { GetNodeVersion(context.Context, ...rpc.Option) (*GetNodeVersionReply, error) GetNodeID(context.Context, ...rpc.Option) (ids.NodeID, error) GetNodeIP(context.Context, ...rpc.Option) (string, error) GetNetworkID(context.Context, ...rpc.Option) (uint32, error) GetNetworkName(context.Context, ...rpc.Option) (string, error) GetBlockchainID(context.Context, string, ...rpc.Option) (ids.ID, error) Peers(context.Context, ...rpc.Option) ([]Peer, error) IsBootstrapped(context.Context, string, ...rpc.Option) (bool, error) GetTxFee(context.Context, ...rpc.Option) (*GetTxFeeResponse, error) Uptime(context.Context, ...rpc.Option) (*UptimeResponse, error) GetVMs(context.Context, ...rpc.Option) (map[ids.ID][]string, error) }
Client interface for an Info API Client
type GetBlockchainIDArgs ¶
type GetBlockchainIDArgs struct {
Alias string `json:"alias"`
}
GetBlockchainIDArgs are the arguments for calling GetBlockchainID
type GetBlockchainIDReply ¶
GetBlockchainIDReply are the results from calling GetBlockchainID
type GetNetworkIDReply ¶
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 ¶
GetNodeIDReply are the results from calling GetNodeID
type GetNodeIPReply ¶ added in v1.0.4
type GetNodeIPReply struct {
IP string `json:"ip"`
}
GetNodeIPReply are the results from calling GetNodeIP
type GetNodeVersionReply ¶
type GetNodeVersionReply struct { Version string `json:"version"` DatabaseVersion string `json:"databaseVersion"` GitCommit string `json:"gitCommit"` VMVersions map[string]string `json:"vmVersions"` }
GetNodeVersionReply are the results from calling GetNodeVersion
type GetTxFeeResponse ¶ added in v0.8.4
type GetTxFeeResponse struct { TxFee json.Uint64 `json:"txFee"` // TODO: remove [CreationTxFee] after enough time for dependencies to update CreationTxFee json.Uint64 `json:"creationTxFee"` CreateAssetTxFee json.Uint64 `json:"createAssetTxFee"` CreateSubnetTxFee json.Uint64 `json:"createSubnetTxFee"` CreateBlockchainTxFee json.Uint64 `json:"createBlockchainTxFee"` }
type GetVMsReply ¶ added in v1.7.6
GetVMsReply contains the response metadata for GetVMs
type Info ¶
type Info struct { Parameters // 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) GetNodeIP ¶ added in v1.0.4
func (service *Info) GetNodeIP(_ *http.Request, _ *struct{}, reply *GetNodeIPReply) error
GetNodeIP returns the IP 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) GetTxFee ¶
func (service *Info) GetTxFee(_ *http.Request, args *struct{}, reply *GetTxFeeResponse) error
GetTxFee returns the transaction fee in nAVAX.
func (*Info) GetVMs ¶ added in v1.7.6
func (service *Info) GetVMs(_ *http.Request, _ *struct{}, reply *GetVMsReply) error
GetVMs lists the virtual machines installed on the node
func (*Info) IsBootstrapped ¶
func (service *Info) IsBootstrapped(_ *http.Request, args *IsBootstrappedArgs, reply *IsBootstrappedResponse) error
IsBootstrapped returns nil and sets [reply.IsBootstrapped] == true iff [args.Chain] exists and is done bootstrapping Returns an error if the chain doesn't exist
type IsBootstrappedArgs ¶
type IsBootstrappedArgs struct { // Alias of the chain // Can also be the string representation of the chain's ID Chain string `json:"chain"` }
IsBootstrappedArgs are the arguments for calling IsBootstrapped
type IsBootstrappedResponse ¶
type IsBootstrappedResponse struct { // True iff the chain exists and is done bootstrapping IsBootstrapped bool `json:"isBootstrapped"` }
IsBootstrappedResponse are the results from calling IsBootstrapped
type Parameters ¶ added in v1.6.5
type PeersReply ¶
type PeersReply struct { // Number of elements in [Peers] NumPeers json.Uint64 `json:"numPeers"` // Each element is a peer Peers []Peer `json:"peers"` }
PeersReply are the results from calling Peers
type UptimeResponse ¶ added in v1.6.5
type UptimeResponse struct { // RewardingStakePercentage shows what percent of network stake thinks we're // above the uptime requirement. RewardingStakePercentage json.Float64 `json:"rewardingStakePercentage"` // WeightedAveragePercentage is the average perceived uptime of this node, // weighted by stake. // Note that this is different from RewardingStakePercentage, which shows // the percent of the network stake that thinks this node is above the // uptime requirement. WeightedAveragePercentage is weighted by uptime. // i.e If uptime requirement is 85 and a peer reports 40 percent it will be // counted (40*weight) in WeightedAveragePercentage but not in // RewardingStakePercentage since 40 < 85 WeightedAveragePercentage json.Float64 `json:"weightedAveragePercentage"` }
UptimeResponse are the results from calling Uptime