info

package
v1.36.181 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Overview

What this node will tell anyone who asks.

The service is a value with a registry of typed operations on it — see ops.go, which is where every question and its answer live. This file is the value: what the service is built from and what it holds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetChainsReply added in v1.24.29

type GetChainsReply struct {
	// Chains are the chains this node is running.
	Chains []chains.ChainInfo `json:"chains"`
}

GetChainsReply is the response for the chains this node runs.

func (*GetChainsReply) MarshalZAP added in v1.36.178

func (x *GetChainsReply) MarshalZAP() ([]byte, error)

MarshalZAP writes GetChainsReply from constant offsets.

func (*GetChainsReply) UnmarshalZAP added in v1.36.178

func (x *GetChainsReply) UnmarshalZAP(data []byte) error

UnmarshalZAP reads GetChainsReply out of the buffer that arrived.

type Info

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

Info is the API service for unprivileged info on a node

func New added in v1.36.179

func New(
	parameters Parameters,
	log log.Logger,
	validators validators.Manager,
	chainManager chains.Manager,
	vmManager vms.Manager,
	myIP *utils.Atomic[netip.AddrPort],
	network network.Network,
) *Info

New builds the info service. Its operations are registered by Info.Ops.

func (*Info) Ops added in v1.36.179

func (i *Info) Ops() *zip.App

Ops is this service's typed operations. The paths are relative to where the app is mounted, which the node decides — a service does not name its own address.

type Parameters

type Parameters struct {
	Version   *version.Application
	NodeID    ids.NodeID
	NodePOP   *signer.ProofOfPossession
	NetworkID uint32
	VMManager vms.Manager
	Upgrades  upgrade.Config

	TxFee            uint64
	CreateAssetTxFee uint64

	// Consensus is the consensus configuration snapshot for this node. The
	// node binary populates it at boot from the live engine state so the
	// node version handler can return it without round-tripping into the
	// chain manager. Nil means "do not advertise" (pre-wired callers, tests).
	Consensus *apiinfo.ConsensusInfo
}

Jump to

Keyboard shortcuts

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