admin

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(nodeID ids.ShortID, networkID uint32, log logging.Logger, chainManager chains.Manager, peers network.Network, httpServer *api.Server) *common.HTTPHandler

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 *AliasReply) error

Alias attempts to alias an HTTP endpoint to a new name

func (*Admin) AliasChain

func (service *Admin) AliasChain(_ *http.Request, args *AliasChainArgs, reply *AliasChainReply) error

AliasChain attempts to alias a chain to a new name

func (*Admin) GetBlockchainID

func (service *Admin) GetBlockchainID(_ *http.Request, args *GetBlockchainIDArgs, reply *GetBlockchainIDReply) error

GetBlockchainID returns the blockchain ID that resolves the alias that was supplied

func (*Admin) GetChainAliases

func (service *Admin) GetChainAliases(r *http.Request, args *GetChainAliasesArgs, reply *GetChainAliasesReply) error

GetChainAliases returns the aliases of the chain whose string representation is [args.ChainID]

func (*Admin) GetNetworkID

func (service *Admin) GetNetworkID(_ *http.Request, _ *struct{}, reply *GetNetworkIDReply) error

GetNetworkID returns the network ID this node is running on

func (*Admin) GetNetworkName added in v0.5.3

func (service *Admin) GetNetworkName(_ *http.Request, _ *struct{}, reply *GetNetworkNameReply) error

GetNetworkName returns the network name this node is running on

func (*Admin) GetNodeID

func (service *Admin) GetNodeID(_ *http.Request, _ *struct{}, reply *GetNodeIDReply) error

GetNodeID returns the node ID of this node

func (*Admin) LockProfile

func (service *Admin) LockProfile(_ *http.Request, args *LockProfileArgs, reply *LockProfileReply) error

LockProfile runs a mutex profile writing to the specified file

func (*Admin) MemoryProfile

func (service *Admin) MemoryProfile(_ *http.Request, args *MemoryProfileArgs, reply *MemoryProfileReply) error

MemoryProfile runs a memory profile writing to the specified file

func (*Admin) Peers

func (service *Admin) Peers(_ *http.Request, _ *struct{}, reply *PeersReply) error

Peers returns the list of current validators

func (*Admin) Stacktrace added in v0.5.0

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

Stacktrace returns the current global stacktrace

func (*Admin) StartCPUProfiler

func (service *Admin) StartCPUProfiler(_ *http.Request, args *StartCPUProfilerArgs, reply *StartCPUProfilerReply) error

StartCPUProfiler starts a cpu profile writing to the specified file

func (*Admin) StopCPUProfiler

func (service *Admin) StopCPUProfiler(_ *http.Request, _ *struct{}, reply *StopCPUProfilerReply) 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 AliasChainReply

type AliasChainReply struct {
	Success bool `json:"success"`
}

AliasChainReply are the results from calling AliasChain

type AliasReply

type AliasReply struct {
	Success bool `json:"success"`
}

AliasReply are the results from calling Alias

type GetBlockchainIDArgs

type GetBlockchainIDArgs struct {
	Alias string `json:"alias"`
}

GetBlockchainIDArgs are the arguments for calling GetBlockchainID

type GetBlockchainIDReply

type GetBlockchainIDReply struct {
	BlockchainID string `json:"blockchainID"`
}

GetBlockchainIDReply are the results from calling GetBlockchainID

type GetChainAliasesArgs

type GetChainAliasesArgs struct{ ChainID string }

GetChainAliasesArgs are the arguments for Admin.GetChainAliases API call

type GetChainAliasesReply

type GetChainAliasesReply struct{ Aliases []string }

GetChainAliasesReply are the arguments for Admin.GetChainAliases API call

type GetNetworkIDReply

type GetNetworkIDReply struct {
	NetworkID cjson.Uint32 `json:"networkID"`
}

GetNetworkIDReply are the results from calling GetNetworkID

type GetNetworkNameReply added in v0.5.3

type GetNetworkNameReply struct {
	NetworkName string `json:"networkName"`
}

GetNetworkNameReply is the result from calling GetNetworkName

type GetNodeIDReply

type GetNodeIDReply struct {
	NodeID ids.ShortID `json:"nodeID"`
}

GetNodeIDReply are the results from calling GetNodeID

type LockProfileArgs

type LockProfileArgs struct {
	Filename string `json:"filename"`
}

LockProfileArgs are the arguments for calling LockProfile

type LockProfileReply

type LockProfileReply struct {
	Success bool `json:"success"`
}

LockProfileReply are the results from calling LockProfile

type MemoryProfileArgs

type MemoryProfileArgs struct {
	Filename string `json:"filename"`
}

MemoryProfileArgs are the arguments for calling MemoryProfile

type MemoryProfileReply

type MemoryProfileReply struct {
	Success bool `json:"success"`
}

MemoryProfileReply are the results from calling MemoryProfile

type PeersReply

type PeersReply struct {
	Peers []network.PeerID `json:"peers"`
}

PeersReply are the results from calling Peers

type Performance

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

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

func (*Performance) LockProfile

func (p *Performance) LockProfile(filename string) error

LockProfile dumps the current lock statistics of this node

func (*Performance) MemoryProfile

func (p *Performance) MemoryProfile(filename string) error

MemoryProfile dumps the current memory utilization of this node

func (*Performance) StartCPUProfiler

func (p *Performance) StartCPUProfiler(filename string) 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

type StacktraceArgs added in v0.5.0

type StacktraceArgs struct{}

StacktraceArgs are the arguments for calling Stacktrace

type StacktraceReply added in v0.5.0

type StacktraceReply struct {
	Stacktrace string `json:"stacktrace"`
}

StacktraceReply are the results from calling Stacktrace

type StartCPUProfilerArgs

type StartCPUProfilerArgs struct {
	Filename string `json:"filename"`
}

StartCPUProfilerArgs are the arguments for calling StartCPUProfiler

type StartCPUProfilerReply

type StartCPUProfilerReply struct {
	Success bool `json:"success"`
}

StartCPUProfilerReply are the results from calling StartCPUProfiler

type StopCPUProfilerReply

type StopCPUProfilerReply struct {
	Success bool `json:"success"`
}

StopCPUProfilerReply are the results from calling StopCPUProfiler

Jump to

Keyboard shortcuts

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