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) GetTrackedChains(_ *http.Request, _ *struct{}, reply *GetTrackedChainsReply) error
- func (a *Admin) ListVMs(_ *http.Request, _ *struct{}, reply *ListVMsReply) 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) SetTrackedChains(_ *http.Request, args *SetTrackedChainsArgs, reply *SetTrackedChainsReply) 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 ChainTracker
- type Client
- func (c *Client) Alias(ctx context.Context, endpoint, alias string, options ...rpc.Option) error
- func (c *Client) AliasChain(ctx context.Context, chain, alias string, options ...rpc.Option) error
- func (c *Client) DBGet(ctx context.Context, key []byte, options ...rpc.Option) ([]byte, error)
- func (c *Client) GetChainAliases(ctx context.Context, chain string, options ...rpc.Option) ([]string, error)
- func (c *Client) GetConfig(ctx context.Context, options ...rpc.Option) (interface{}, error)
- func (c *Client) GetLoggerLevel(ctx context.Context, loggerName string, options ...rpc.Option) (map[string]LogAndDisplayLevels, error)
- func (c *Client) ListVMs(ctx context.Context, options ...rpc.Option) (map[string]VMInfo, error)
- func (c *Client) LoadVMs(ctx context.Context, options ...rpc.Option) (map[ids.ID][]string, map[ids.ID]string, error)
- func (c *Client) LockProfile(ctx context.Context, options ...rpc.Option) error
- func (c *Client) MemoryProfile(ctx context.Context, options ...rpc.Option) error
- func (c *Client) SetLoggerLevel(ctx context.Context, loggerName, logLevel, displayLevel string, ...) (map[string]LogAndDisplayLevels, error)
- func (c *Client) Stacktrace(ctx context.Context, options ...rpc.Option) error
- func (c *Client) StartCPUProfiler(ctx context.Context, options ...rpc.Option) error
- func (c *Client) StopCPUProfiler(ctx context.Context, options ...rpc.Option) error
- type Config
- type DBGetArgs
- type DBGetReply
- type GetChainAliasesArgs
- type GetChainAliasesReply
- type GetLoggerLevelArgs
- type GetTrackedChainsReply
- type KeyValueReader
- type ListVMsReply
- type LoadVMsReply
- type LogAndDisplayLevels
- type LoggerLevelReply
- type SetLoggerLevelArgs
- type SetTrackedChainsArgs
- type SetTrackedChainsReply
- type VMInfo
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) GetConfig ¶ added in v0.1.1
GetConfig returns the config that the node was started with.
func (*Admin) GetLoggerLevel ¶ added in v0.1.1
func (a *Admin) GetLoggerLevel(_ *http.Request, args *GetLoggerLevelArgs, reply *LoggerLevelReply) error
GetLoggerLevel returns the log level and display level of all loggers.
func (*Admin) GetTrackedChains ¶ added in v1.22.36
func (a *Admin) GetTrackedChains(_ *http.Request, _ *struct{}, reply *GetTrackedChainsReply) error
GetTrackedChains returns the list of chains currently being tracked by this node.
func (*Admin) ListVMs ¶ added in v1.22.36
func (a *Admin) ListVMs(_ *http.Request, _ *struct{}, reply *ListVMsReply) error
ListVMs returns all registered VMs with their IDs, aliases, and paths
func (*Admin) LoadVMs ¶ added in v0.1.1
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. After loading new VMs, it retries creating any chains that were waiting for those VMs (hot-loading support).
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 v0.1.1
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) SetTrackedChains ¶ added in v1.22.36
func (a *Admin) SetTrackedChains(_ *http.Request, args *SetTrackedChainsArgs, reply *SetTrackedChainsReply) error
SetTrackedChains adds chains to be tracked by this node at runtime. This enables the node to track new chains without requiring a restart.
func (*Admin) Stacktrace ¶ added in v0.1.1
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 ChainTracker ¶ added in v1.22.36
ChainTracker is the interface for tracking chains at runtime
type Client ¶ added in v0.1.1
type Client struct {
Requester rpc.EndpointRequester
}
func (*Client) AliasChain ¶ added in v0.1.1
func (*Client) GetChainAliases ¶ added in v0.1.1
func (*Client) GetLoggerLevel ¶ added in v0.1.1
func (*Client) LockProfile ¶ added in v0.1.1
func (*Client) MemoryProfile ¶ added in v0.1.1
func (*Client) SetLoggerLevel ¶ added in v0.1.1
func (*Client) Stacktrace ¶ added in v0.1.1
func (*Client) StartCPUProfiler ¶ added in v0.1.1
type DBGetReply ¶ added in v0.1.1
type DBGetReply struct {
Value string `json:"value"`
}
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 v0.1.1
type GetLoggerLevelArgs struct {
LoggerName string `json:"loggerName"`
}
type GetTrackedChainsReply ¶ added in v1.22.36
type GetTrackedChainsReply struct {
TrackedChains []string `json:"trackedChains"`
}
GetTrackedChainsReply is the response from GetTrackedChains
type KeyValueReader ¶ added in v0.1.1
type KeyValueReader struct {
// contains filtered or unexported fields
}
func NewKeyValueReader ¶ added in v0.1.1
func NewKeyValueReader(client *Client) *KeyValueReader
type ListVMsReply ¶ added in v1.22.36
ListVMsReply contains the response for ListVMs
type LoadVMsReply ¶ added in v0.1.1
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"`
// ChainsRetried is the number of chains that were re-queued for creation
// after VMs were hot-loaded
ChainsRetried int `json:"chainsRetried,omitempty"`
}
LoadVMsReply contains the response metadata for LoadVMs
type LogAndDisplayLevels ¶ added in v0.1.1
type LoggerLevelReply ¶ added in v0.1.1
type LoggerLevelReply struct {
LoggerLevels map[string]LogAndDisplayLevels `json:"loggerLevels"`
}
type SetLoggerLevelArgs ¶ added in v0.1.1
type SetTrackedChainsArgs ¶ added in v1.22.36
type SetTrackedChainsArgs struct {
Chains []string `json:"chains"`
}
SetTrackedChainsArgs are the arguments for SetTrackedChains
type SetTrackedChainsReply ¶ added in v1.22.36
type SetTrackedChainsReply struct {
TrackedChains []string `json:"trackedChains"`
}
SetTrackedChainsReply is the response from SetTrackedChains