admin

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(log logging.Logger, chainManager chains.Manager, httpServer *server.Server) (*common.HTTPHandler, error)

NewService returns a new admin API service

Types

type Admin

type Admin struct {
	// contains filtered or unexported fields
}

Admin is the API service for node admin management

func (*Admin) Alias

func (service *Admin) Alias(_ *http.Request, args *AliasArgs, reply *api.SuccessResponse) error

Alias attempts to alias an HTTP endpoint to a new name

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(r *http.Request, args *GetChainAliasesArgs, reply *GetChainAliasesReply) error

GetChainAliases returns the aliases of the chain

func (*Admin) LockProfile

func (service *Admin) LockProfile(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error

LockProfile runs a mutex profile writing to the specified file

func (*Admin) MemoryProfile

func (service *Admin) MemoryProfile(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error

MemoryProfile runs a memory profile writing to the specified file

func (*Admin) Stacktrace

func (service *Admin) Stacktrace(_ *http.Request, _ *struct{}, reply *api.SuccessResponse) error

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 AliasArgs

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

AliasArgs are the arguments for calling Alias

type AliasChainArgs

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

AliasChainArgs are the arguments for calling AliasChain

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for the Avalanche Platform Info API Endpoint

func NewClient

func NewClient(uri string, requestTimeout time.Duration) *Client

NewClient returns a new Info API Client

func (*Client) Alias

func (c *Client) Alias(endpoint, alias string) (bool, error)

Alias ...

func (*Client) AliasChain

func (c *Client) AliasChain(chain, alias string) (bool, error)

AliasChain ...

func (*Client) GetChainAliases

func (c *Client) GetChainAliases(chain string) ([]string, error)

GetChainAliases ...

func (*Client) LockProfile

func (c *Client) LockProfile() (bool, error)

LockProfile ...

func (*Client) MemoryProfile

func (c *Client) MemoryProfile() (bool, error)

MemoryProfile ...

func (*Client) Stacktrace

func (c *Client) Stacktrace() (bool, error)

Stacktrace ...

func (*Client) StartCPUProfiler

func (c *Client) StartCPUProfiler() (bool, error)

StartCPUProfiler ...

func (*Client) StopCPUProfiler

func (c *Client) StopCPUProfiler() (bool, error)

StopCPUProfiler ...

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 Performance

type Performance struct {
	// contains filtered or unexported fields
}

Performance provides helper methods for measuring the current performance of the system

func NewDefaultPerformanceService

func NewDefaultPerformanceService() *Performance

func NewPerformanceService

func NewPerformanceService(prefix string) *Performance

func (*Performance) LockProfile

func (p *Performance) LockProfile() error

LockProfile dumps the current lock statistics of this node

func (*Performance) MemoryProfile

func (p *Performance) MemoryProfile() error

MemoryProfile dumps the current memory utilization of this node

func (*Performance) StartCPUProfiler

func (p *Performance) StartCPUProfiler() error

StartCPUProfiler starts measuring the cpu utilization of this node

func (*Performance) StopCPUProfiler

func (p *Performance) StopCPUProfiler() error

StopCPUProfiler stops measuring the cpu utilization of this node

Jump to

Keyboard shortcuts

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