Documentation ¶
Index ¶
- func NewService(config Config) (http.Handler, error)
- type Admin
- func (a *Admin) Alias(_ *http.Request, args *AliasArgs, _ *api.EmptyReply) error
- func (a *Admin) AliasChain(_ *http.Request, args *AliasChainArgs, _ *api.EmptyReply) error
- func (a *Admin) DbGet(_ *http.Request, args *DBGetArgs, reply *DBGetReply) error
- func (a *Admin) GetChainAliases(_ *http.Request, args *GetChainAliasesArgs, reply *GetChainAliasesReply) error
- func (a *Admin) GetConfig(_ *http.Request, _ *struct{}, reply *interface{}) error
- func (a *Admin) GetLoggerLevel(_ *http.Request, args *GetLoggerLevelArgs, reply *LoggerLevelReply) error
- func (a *Admin) LoadVMs(r *http.Request, _ *struct{}, reply *LoadVMsReply) error
- func (a *Admin) LockProfile(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (a *Admin) MemoryProfile(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (a *Admin) SetLoggerLevel(_ *http.Request, args *SetLoggerLevelArgs, reply *LoggerLevelReply) error
- func (a *Admin) Stacktrace(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (a *Admin) StartCPUProfiler(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (a *Admin) StopCPUProfiler(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- type AliasArgs
- type AliasChainArgs
- type Client
- type Config
- type DBGetArgs
- type DBGetReply
- type GetChainAliasesArgs
- type GetChainAliasesReply
- type GetLoggerLevelArgs
- type KeyValueReader
- type LoadVMsReply
- type LogAndDisplayLevels
- type LoggerLevelReply
- type SetLoggerLevelArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Admin ¶
type Admin struct { Config // contains filtered or unexported fields }
Admin is the API service for node admin management
func (*Admin) AliasChain ¶
func (a *Admin) AliasChain(_ *http.Request, args *AliasChainArgs, _ *api.EmptyReply) error
AliasChain attempts to alias a chain to a new name
func (*Admin) GetChainAliases ¶
func (a *Admin) GetChainAliases(_ *http.Request, args *GetChainAliasesArgs, reply *GetChainAliasesReply) error
GetChainAliases returns the aliases of the chain
func (*Admin) GetLoggerLevel ¶
func (a *Admin) GetLoggerLevel(_ *http.Request, args *GetLoggerLevelArgs, reply *LoggerLevelReply) error
GetLoggerLevel returns the log level and display level of all loggers.
func (*Admin) LoadVMs ¶
func (a *Admin) LoadVMs(r *http.Request, _ *struct{}, reply *LoadVMsReply) error
LoadVMs loads any new VMs available to the node and returns the added VMs.
func (*Admin) LockProfile ¶
LockProfile runs a mutex profile writing to the specified file
func (*Admin) MemoryProfile ¶
MemoryProfile runs a memory profile writing to the specified file
func (*Admin) SetLoggerLevel ¶
func (a *Admin) SetLoggerLevel(_ *http.Request, args *SetLoggerLevelArgs, reply *LoggerLevelReply) error
SetLoggerLevel sets the log level and/or display level for loggers. If len([args.LoggerName]) == 0, sets the log/display level of all loggers. Otherwise, sets the log/display level of the loggers named in that argument. Sets the log level of these loggers to args.LogLevel. If args.LogLevel == nil, doesn't set the log level of these loggers. If args.LogLevel != nil, must be a valid string representation of a log level. Sets the display level of these loggers to args.LogLevel. If args.DisplayLevel == nil, doesn't set the display level of these loggers. If args.DisplayLevel != nil, must be a valid string representation of a log level.
func (*Admin) Stacktrace ¶
Stacktrace returns the current global stacktrace
func (*Admin) StartCPUProfiler ¶
StartCPUProfiler starts a cpu profile writing to the specified file
func (*Admin) StopCPUProfiler ¶
StopCPUProfiler stops the cpu profile
type AliasChainArgs ¶
AliasChainArgs are the arguments for calling AliasChain
type Client ¶
type Client interface { StartCPUProfiler(context.Context, ...rpc.Option) error StopCPUProfiler(context.Context, ...rpc.Option) error MemoryProfile(context.Context, ...rpc.Option) error LockProfile(context.Context, ...rpc.Option) error Alias(ctx context.Context, endpoint string, alias string, options ...rpc.Option) error AliasChain(ctx context.Context, chainID string, alias string, options ...rpc.Option) error GetChainAliases(ctx context.Context, chainID string, options ...rpc.Option) ([]string, error) Stacktrace(context.Context, ...rpc.Option) error LoadVMs(context.Context, ...rpc.Option) (map[ids.ID][]string, map[ids.ID]string, error) SetLoggerLevel(ctx context.Context, loggerName, logLevel, displayLevel string, options ...rpc.Option) (map[string]LogAndDisplayLevels, error) GetLoggerLevel(ctx context.Context, loggerName string, options ...rpc.Option) (map[string]LogAndDisplayLevels, error) GetConfig(ctx context.Context, options ...rpc.Option) (interface{}, error) DBGet(ctx context.Context, key []byte, options ...rpc.Option) ([]byte, error) }
Client interface for the Avalanche Platform Info API Endpoint
type DBGetReply ¶
type GetChainAliasesArgs ¶
type GetChainAliasesArgs struct {
Chain string `json:"chain"`
}
GetChainAliasesArgs are the arguments for calling GetChainAliases
type GetChainAliasesReply ¶
type GetChainAliasesReply struct {
Aliases []string `json:"aliases"`
}
GetChainAliasesReply are the aliases of the given chain
type GetLoggerLevelArgs ¶
type GetLoggerLevelArgs struct {
LoggerName string `json:"loggerName"`
}
type KeyValueReader ¶
type KeyValueReader struct {
// contains filtered or unexported fields
}
func NewKeyValueReader ¶
func NewKeyValueReader(client Client) *KeyValueReader
type LoadVMsReply ¶
type LoadVMsReply struct { // VMs and their aliases which were successfully loaded NewVMs map[ids.ID][]string `json:"newVMs"` // VMs that failed to be loaded and the error message FailedVMs map[ids.ID]string `json:"failedVMs,omitempty"` }
LoadVMsReply contains the response metadata for LoadVMs
type LogAndDisplayLevels ¶
type LoggerLevelReply ¶
type LoggerLevelReply struct {
LoggerLevels map[string]LogAndDisplayLevels `json:"loggerLevels"`
}