Documentation ¶
Index ¶
- func NewService(config Config) (*common.HTTPHandler, error)
- type Admin
- func (service *Admin) Alias(_ *http.Request, args *AliasArgs, reply *api.SuccessResponse) error
- func (service *Admin) AliasChain(_ *http.Request, args *AliasChainArgs, reply *api.SuccessResponse) error
- func (service *Admin) GetChainAliases(_ *http.Request, args *GetChainAliasesArgs, reply *GetChainAliasesReply) error
- func (service *Admin) GetConfig(_ *http.Request, args *struct{}, reply *interface{}) error
- func (service *Admin) GetLoggerLevel(_ *http.Request, args *GetLoggerLevelArgs, reply *GetLoggerLevelReply) error
- func (service *Admin) LockProfile(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
- func (service *Admin) MemoryProfile(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
- func (service *Admin) SetLoggerLevel(_ *http.Request, args *SetLoggerLevelArgs, reply *api.SuccessResponse) error
- func (service *Admin) Stacktrace(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
- func (service *Admin) StartCPUProfiler(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
- func (service *Admin) StopCPUProfiler(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
- type AliasArgs
- type AliasChainArgs
- type Client
- type Config
- type GetChainAliasesArgs
- type GetChainAliasesReply
- type GetLoggerLevelArgs
- type GetLoggerLevelReply
- type LogAndDisplayLevels
- type SetLoggerLevelArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(config Config) (*common.HTTPHandler, error)
NewService returns a new admin API service. All of the fields in [config] must be set.
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 (service *Admin) AliasChain(_ *http.Request, args *AliasChainArgs, reply *api.SuccessResponse) error
AliasChain attempts to alias a chain to a new name
func (*Admin) GetChainAliases ¶
func (service *Admin) GetChainAliases(_ *http.Request, args *GetChainAliasesArgs, reply *GetChainAliasesReply) error
GetChainAliases returns the aliases of the chain
func (*Admin) GetConfig ¶ added in v1.7.6
GetConfig returns the config that the node was started with.
func (*Admin) GetLoggerLevel ¶ added in v1.7.6
func (service *Admin) GetLoggerLevel(_ *http.Request, args *GetLoggerLevelArgs, reply *GetLoggerLevelReply) error
GetLogLevel returns the log level and display level of all loggers.
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 ¶ added in v1.7.6
func (service *Admin) SetLoggerLevel(_ *http.Request, args *SetLoggerLevelArgs, reply *api.SuccessResponse) 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 ¶ added in v1.7.6
Stacktrace returns the current global stacktrace
func (*Admin) StartCPUProfiler ¶
func (service *Admin) StartCPUProfiler(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
StartCPUProfiler starts a cpu profile writing to the specified file
func (*Admin) StopCPUProfiler ¶
func (service *Admin) StopCPUProfiler(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error
StopCPUProfiler stops the cpu profile
type AliasChainArgs ¶
AliasChainArgs are the arguments for calling AliasChain
type Client ¶ added in v1.7.6
type Client interface { StartCPUProfiler(context.Context) (bool, error) StopCPUProfiler(context.Context) (bool, error) MemoryProfile(context.Context) (bool, error) LockProfile(context.Context) (bool, error) Alias(ctx context.Context, endpoint string, alias string) (bool, error) AliasChain(ctx context.Context, chainID string, alias string) (bool, error) GetChainAliases(ctx context.Context, chainID string) ([]string, error) Stacktrace(context.Context) (bool, error) }
Client interface for the Avalanche Platform Info API Endpoint
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 ¶ added in v1.7.6
type GetLoggerLevelArgs struct {
LoggerName string `json:"loggerName"`
}
See GetLoggerLevel
type GetLoggerLevelReply ¶ added in v1.7.6
type GetLoggerLevelReply struct {
LoggerLevels map[string]LogAndDisplayLevels `json:"loggerLevels"`
}
See GetLoggerLevel