Documentation
¶
Index ¶
- type ChainTracker
- type Config
- type Service
- func (a *Service) Alias(ctx context.Context, args *apiadmin.AliasArgs) (*apiadmin.EmptyReply, error)
- func (a *Service) AliasChain(ctx context.Context, args *apiadmin.AliasChainArgs) (*apiadmin.EmptyReply, error)
- func (a *Service) CreateHandler() (http.Handler, error)
- func (a *Service) DbGet(ctx context.Context, args *apiadmin.DBGetArgs) (*apiadmin.DBGetReply, error)
- func (a *Service) GetBackupMetadata(ctx context.Context) (*backup.Metadata, error)
- func (a *Service) GetChainAliases(ctx context.Context, args *apiadmin.GetChainAliasesArgs) (*apiadmin.GetChainAliasesReply, error)
- func (a *Service) GetConfig(ctx context.Context) (any, error)
- func (a *Service) GetLoggerLevel(ctx context.Context, args *apiadmin.GetLoggerLevelArgs) (*apiadmin.LoggerLevelReply, error)
- func (a *Service) GetTrackedChains(ctx context.Context) (*apiadmin.GetTrackedChainsReply, error)
- func (a *Service) ListVMs(ctx context.Context) (*apiadmin.ListVMsReply, error)
- func (a *Service) Load(ctx context.Context, args *apiadmin.LoadArgs) (*apiadmin.EmptyReply, error)
- func (a *Service) LoadVMs(ctx context.Context) (*apiadmin.LoadVMsReply, error)
- func (a *Service) LockProfile(ctx context.Context) (*apiadmin.EmptyReply, error)
- func (a *Service) MemoryProfile(ctx context.Context) (*apiadmin.EmptyReply, error)
- func (a *Service) SetLoggerLevel(ctx context.Context, args *apiadmin.SetLoggerLevelArgs) (*apiadmin.EmptyReply, error)
- func (a *Service) SetTrackedChains(ctx context.Context, args *apiadmin.SetTrackedChainsArgs) (*apiadmin.SetTrackedChainsReply, error)
- func (a *Service) Snapshot(ctx context.Context, args *apiadmin.SnapshotArgs) (*apiadmin.SnapshotReply, error)
- func (a *Service) Stacktrace(ctx context.Context) (*apiadmin.EmptyReply, error)
- func (a *Service) StartCPUProfiler(ctx context.Context) (*apiadmin.EmptyReply, error)
- func (a *Service) StopCPUProfiler(ctx context.Context) (*apiadmin.EmptyReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainTracker ¶
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
// 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 implements api/admin.Service.
func (*Service) AliasChain ¶
func (a *Service) AliasChain(ctx context.Context, args *apiadmin.AliasChainArgs) (*apiadmin.EmptyReply, error)
func (*Service) CreateHandler ¶
CreateHandler returns an HTTP handler for the admin API.
func (*Service) GetBackupMetadata ¶ added in v1.23.0
GetBackupMetadata returns information about the last backup.
func (*Service) GetChainAliases ¶
func (a *Service) GetChainAliases(ctx context.Context, args *apiadmin.GetChainAliasesArgs) (*apiadmin.GetChainAliasesReply, error)
func (*Service) GetLoggerLevel ¶
func (a *Service) GetLoggerLevel(ctx context.Context, args *apiadmin.GetLoggerLevelArgs) (*apiadmin.LoggerLevelReply, error)
func (*Service) GetTrackedChains ¶
func (*Service) Load ¶ added in v1.23.0
Load restores the database from a backup file. Args:
- Path: file path to read the backup from (detects .zst extension for decompression)
Warning: This will overwrite the current database state.
func (*Service) LockProfile ¶
func (*Service) MemoryProfile ¶
func (*Service) SetLoggerLevel ¶
func (a *Service) SetLoggerLevel(ctx context.Context, args *apiadmin.SetLoggerLevelArgs) (*apiadmin.EmptyReply, error)
func (*Service) SetTrackedChains ¶
func (a *Service) SetTrackedChains(ctx context.Context, args *apiadmin.SetTrackedChainsArgs) (*apiadmin.SetTrackedChainsReply, error)
func (*Service) Snapshot ¶ added in v1.23.0
func (a *Service) Snapshot(ctx context.Context, args *apiadmin.SnapshotArgs) (*apiadmin.SnapshotReply, error)
Snapshot creates a backup of the database to the specified path. Args:
- Path: file path to write the backup (supports .zst extension for compression)
- Since: version for incremental backup (0 for full backup)
Returns the version number for use in future incremental backups.
func (*Service) Stacktrace ¶
func (*Service) StartCPUProfiler ¶
func (*Service) StopCPUProfiler ¶
Click to show internal directories.
Click to hide internal directories.