admin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 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 Peerable, 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(r *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(r *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(r *http.Request, args *GetNetworkIDArgs, reply *GetNetworkIDReply) error

GetNetworkID returns the network ID this node is running on

func (*Admin) GetNodeID

func (service *Admin) GetNodeID(r *http.Request, args *GetNodeIDArgs, reply *GetNodeIDReply) error

GetNodeID returns the node ID of this node

func (*Admin) LockProfile

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

LockProfile runs a mutex profile writing to the specified file

func (*Admin) MemoryProfile

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

MemoryProfile runs a memory profile writing to the specified file

func (*Admin) Peers

func (service *Admin) Peers(r *http.Request, args *PeersArgs, reply *PeersReply) error

Peers returns the list of current validators

func (*Admin) StartCPUProfiler

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

StartCPUProfiler starts a cpu profile writing to the specified file

func (*Admin) StopCPUProfiler

func (service *Admin) StopCPUProfiler(r *http.Request, args *StopCPUProfilerArgs, 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 GetNetworkIDArgs

type GetNetworkIDArgs struct{}

GetNetworkIDArgs are the arguments for calling GetNetworkID

type GetNetworkIDReply

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

GetNetworkIDReply are the results from calling GetNetworkID

type GetNodeIDArgs

type GetNodeIDArgs struct{}

GetNodeIDArgs are the arguments for calling GetNodeID

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 Networking

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

Networking provides helper methods for tracking the current network state

func (*Networking) Peers

func (n *Networking) Peers() ([]string, error)

Peers returns the current peers

type Peerable

type Peerable interface{ IPs() []utils.IPDesc }

Peerable can return a group of peers

type PeersArgs

type PeersArgs struct{}

PeersArgs are the arguments for calling Peers

type PeersReply

type PeersReply struct {
	Peers []string `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 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 StopCPUProfilerArgs

type StopCPUProfilerArgs struct{}

StopCPUProfilerArgs are the arguments for calling StopCPUProfiler

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