admin

package
v1.1.13 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: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasArgs

type AliasArgs struct {
	Endpoint string `json:"endpoint"`
	Alias    string `json:"alias"`
}

AliasArgs are the arguments for calling Alias.

func (*AliasArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes AliasArgs from constant offsets.

func (*AliasArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads AliasArgs out of the buffer that arrived.

type AliasChainArgs

type AliasChainArgs struct {
	Chain string `json:"chain"`
	Alias string `json:"alias"`
}

AliasChainArgs are the arguments for calling AliasChain.

func (*AliasChainArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes AliasChainArgs from constant offsets.

func (*AliasChainArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads AliasChainArgs out of the buffer that arrived.

type DBGetArgs

type DBGetArgs struct {
	Key string `json:"key"`
}

DBGetArgs are the arguments for DBGet.

func (*DBGetArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes DBGetArgs from constant offsets.

func (*DBGetArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads DBGetArgs out of the buffer that arrived.

type DBGetReply

type DBGetReply struct {
	Value string `json:"value"`
}

DBGetReply is the reply for DBGet.

func (*DBGetReply) MarshalZAP added in v1.1.13

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

MarshalZAP writes DBGetReply from constant offsets.

func (*DBGetReply) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads DBGetReply out of the buffer that arrived.

type EmptyReply

type EmptyReply = types.EmptyReply

EmptyReply is an alias to common empty reply.

type GetChainAliasesArgs

type GetChainAliasesArgs struct {
	Chain string `json:"chain"`
}

GetChainAliasesArgs are the arguments for calling GetChainAliases.

func (*GetChainAliasesArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes GetChainAliasesArgs from constant offsets.

func (*GetChainAliasesArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads GetChainAliasesArgs out of the buffer that arrived.

type GetChainAliasesReply

type GetChainAliasesReply struct {
	Aliases []string `json:"aliases"`
}

GetChainAliasesReply are the aliases of the given chain.

func (*GetChainAliasesReply) MarshalZAP added in v1.1.13

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

MarshalZAP writes GetChainAliasesReply from constant offsets.

func (*GetChainAliasesReply) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads GetChainAliasesReply out of the buffer that arrived.

type GetLoggerLevelArgs

type GetLoggerLevelArgs struct {
	LoggerName string `json:"loggerName"`
}

GetLoggerLevelArgs are the arguments for getting logger levels.

func (*GetLoggerLevelArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes GetLoggerLevelArgs from constant offsets.

func (*GetLoggerLevelArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads GetLoggerLevelArgs out of the buffer that arrived.

type GetTrackedChainsReply

type GetTrackedChainsReply struct {
	TrackedChains []string `json:"trackedChains"`
}

GetTrackedChainsReply is the response for GetTrackedChains.

func (*GetTrackedChainsReply) MarshalZAP added in v1.1.13

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

MarshalZAP writes GetTrackedChainsReply from constant offsets.

func (*GetTrackedChainsReply) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads GetTrackedChainsReply out of the buffer that arrived.

type ListVMsReply

type ListVMsReply struct {
	VMs map[string]VMInfo `json:"vms"`
}

ListVMsReply contains the response for ListVMs.

type LoadArgs

type LoadArgs struct {
	Path string `json:"path"`
}

LoadArgs are the arguments for Load.

func (*LoadArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes LoadArgs from constant offsets.

func (*LoadArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads LoadArgs out of the buffer that arrived.

type LoadVMsReply

type LoadVMsReply struct {
	NewVMs        map[ids.ID][]string `json:"newVMs"`
	FailedVMs     map[ids.ID]string   `json:"failedVMs"`
	ChainsRetried int                 `json:"chainsRetried"`
}

LoadVMsReply contains the response for LoadVMs.

type LogAndDisplayLevels

type LogAndDisplayLevels struct {
	LogLevel     string `json:"logLevel"`
	DisplayLevel string `json:"displayLevel"`
}

LogAndDisplayLevels pairs log and display levels.

type LoggerLevelReply

type LoggerLevelReply struct {
	LoggerLevels map[string]LogAndDisplayLevels `json:"loggerLevels"`
}

LoggerLevelReply are the levels of the loggers.

type Service

type Service interface {
	StartCPUProfiler(ctx context.Context) (*EmptyReply, error)
	StopCPUProfiler(ctx context.Context) (*EmptyReply, error)
	MemoryProfile(ctx context.Context) (*EmptyReply, error)
	LockProfile(ctx context.Context) (*EmptyReply, error)

	Alias(ctx context.Context, args *AliasArgs) (*EmptyReply, error)
	AliasChain(ctx context.Context, args *AliasChainArgs) (*EmptyReply, error)
	GetChainAliases(ctx context.Context, args *GetChainAliasesArgs) (*GetChainAliasesReply, error)

	Stacktrace(ctx context.Context) (*EmptyReply, error)
	SetLoggerLevel(ctx context.Context, args *SetLoggerLevelArgs) (*EmptyReply, error)
	GetLoggerLevel(ctx context.Context, args *GetLoggerLevelArgs) (*LoggerLevelReply, error)
	GetConfig(ctx context.Context) (any, error)

	LoadVMs(ctx context.Context) (*LoadVMsReply, error)
	DbGet(ctx context.Context, args *DBGetArgs) (*DBGetReply, error)
	ListVMs(ctx context.Context) (*ListVMsReply, error)

	SetTrackedChains(ctx context.Context, args *SetTrackedChainsArgs) (*SetTrackedChainsReply, error)
	GetTrackedChains(ctx context.Context) (*GetTrackedChainsReply, error)

	// Snapshot creates a database backup to the specified path.
	// Use .zst extension for zstd compression.
	// since: 0 for full backup, or version from last backup for incremental.
	// Returns the version number for future incremental backups.
	Snapshot(ctx context.Context, args *SnapshotArgs) (*SnapshotReply, error)

	// Load restores the database from a backup file.
	// Detects compression from .zst extension.
	Load(ctx context.Context, args *LoadArgs) (*EmptyReply, error)
}

Service defines the admin API contract.

type SetLoggerLevelArgs

type SetLoggerLevelArgs struct {
	LoggerName   string `json:"loggerName"`
	LogLevel     string `json:"logLevel"`
	DisplayLevel string `json:"displayLevel"`
}

SetLoggerLevelArgs are the arguments for setting a logger's levels.

func (*SetLoggerLevelArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes SetLoggerLevelArgs from constant offsets.

func (*SetLoggerLevelArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads SetLoggerLevelArgs out of the buffer that arrived.

type SetTrackedChainsArgs

type SetTrackedChainsArgs struct {
	Chains []string `json:"chains"`
}

SetTrackedChainsArgs are the arguments for SetTrackedChains.

func (*SetTrackedChainsArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes SetTrackedChainsArgs from constant offsets.

func (*SetTrackedChainsArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads SetTrackedChainsArgs out of the buffer that arrived.

type SetTrackedChainsReply

type SetTrackedChainsReply struct {
	TrackedChains []string `json:"trackedChains"`
}

SetTrackedChainsReply is the response for SetTrackedChains.

func (*SetTrackedChainsReply) MarshalZAP added in v1.1.13

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

MarshalZAP writes SetTrackedChainsReply from constant offsets.

func (*SetTrackedChainsReply) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads SetTrackedChainsReply out of the buffer that arrived.

type SnapshotArgs

type SnapshotArgs struct {
	Path  string `json:"path"`
	Since uint64 `json:"since"`
}

SnapshotArgs are the arguments for Snapshot.

func (*SnapshotArgs) MarshalZAP added in v1.1.13

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

MarshalZAP writes SnapshotArgs from constant offsets.

func (*SnapshotArgs) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads SnapshotArgs out of the buffer that arrived.

type SnapshotReply

type SnapshotReply struct {
	Version uint64 `json:"version"`
}

SnapshotReply is the response for Snapshot.

func (*SnapshotReply) MarshalZAP added in v1.1.13

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

MarshalZAP writes SnapshotReply from constant offsets.

func (*SnapshotReply) UnmarshalZAP added in v1.1.13

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

UnmarshalZAP reads SnapshotReply out of the buffer that arrived.

type VMInfo

type VMInfo struct {
	ID      string   `json:"id"`
	Aliases []string `json:"aliases"`
	Path    string   `json:"path,omitempty"`
}

VMInfo contains information about a registered VM.

Jump to

Keyboard shortcuts

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