admin

package
v1.22.87 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

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   interface{}
	DB           database.Database
	ChainManager chains.Manager
	HTTPServer   server.PathAdderWithReadLock
	VMRegistry   registry.VMRegistry
	VMManager    vms.Manager
	PluginDir    string
	Network      ChainTracker
}

type Service

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

Service implements api/admin.Service.

func New

func New(config Config) *Service

func (*Service) Alias

func (a *Service) Alias(ctx context.Context, args *apiadmin.AliasArgs) (*apiadmin.EmptyReply, error)

func (*Service) AliasChain

func (a *Service) AliasChain(ctx context.Context, args *apiadmin.AliasChainArgs) (*apiadmin.EmptyReply, error)

func (*Service) CreateHandler

func (a *Service) CreateHandler() (http.Handler, error)

CreateHandler returns an HTTP handler for the admin API.

func (*Service) DbGet

func (a *Service) DbGet(ctx context.Context, args *apiadmin.DBGetArgs) (*apiadmin.DBGetReply, error)

func (*Service) GetChainAliases

func (*Service) GetConfig

func (a *Service) GetConfig(ctx context.Context) (any, error)

func (*Service) GetLoggerLevel

func (*Service) GetTrackedChains

func (a *Service) GetTrackedChains(ctx context.Context) (*apiadmin.GetTrackedChainsReply, error)

func (*Service) ListVMs

func (a *Service) ListVMs(ctx context.Context) (*apiadmin.ListVMsReply, error)

func (*Service) LoadVMs

func (a *Service) LoadVMs(ctx context.Context) (*apiadmin.LoadVMsReply, error)

func (*Service) LockProfile

func (a *Service) LockProfile(ctx context.Context) (*apiadmin.EmptyReply, error)

func (*Service) MemoryProfile

func (a *Service) MemoryProfile(ctx context.Context) (*apiadmin.EmptyReply, error)

func (*Service) SetLoggerLevel

func (a *Service) SetLoggerLevel(ctx context.Context, args *apiadmin.SetLoggerLevelArgs) (*apiadmin.EmptyReply, error)

func (*Service) SetTrackedChains

func (*Service) Stacktrace

func (a *Service) Stacktrace(ctx context.Context) (*apiadmin.EmptyReply, error)

func (*Service) StartCPUProfiler

func (a *Service) StartCPUProfiler(ctx context.Context) (*apiadmin.EmptyReply, error)

func (*Service) StopCPUProfiler

func (a *Service) StopCPUProfiler(ctx context.Context) (*apiadmin.EmptyReply, error)

Jump to

Keyboard shortcuts

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