admin

package
v1.36.180 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: 26 Imported by: 0

Documentation

Overview

Operating a node.

The service is a value with a registry of typed operations on it — see ops.go, which is where every operation and its doc live. This file is the value: what the service is built from, what it holds, and the two things more than one operation needs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainTracker

type ChainTracker interface {
	TrackChain(chainID ids.ID) error
	TrackedChains() set.Set[ids.ID]
}

ChainTracker is the interface for tracking chains at runtime.

type Config

type Config struct {
	Log        log.Logger
	ProfileDir string
	LogFactory log.Factory
	// NodeConfig is the configuration this node booted with. It is the node's
	// own type rather than an `any` because an operation's reply is its type:
	// an untyped one has no schema, no MCP shape and no generated client. What
	// may be DISCLOSED of it is a separate question with its own answer —
	// `json:"-"` on the fields that hold key material, in config/node.
	NodeConfig   *nodeconfig.Config
	DB           database.Database
	ChainManager chains.Manager
	HTTPServer   server.PathAdderWithReadLock
	VMRegistry   registry.VMRegistry
	VMManager    vms.Manager
	PluginDir    string
	Network      ChainTracker
	// DataDir is the node's data directory, used for backup metadata.
	DataDir string
}

type Service

type Service struct {
	Config
	// contains filtered or unexported fields
}

Service is the node's operator API. Its operations are registered by Service.Ops.

func New

func New(config Config) *Service

func (*Service) Ops added in v1.36.179

func (a *Service) 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.

Jump to

Keyboard shortcuts

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