debugapi

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-3-Clause Imports: 54 Imported by: 0

Documentation

Overview

Package debugapi exposes the debug API used to control and analyze low-level and runtime features and functionalities of Bee.

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.0"

Version is set in the build process.

Functions

This section is empty.

Types

type BeeNodeMode added in v1.4.1

type BeeNodeMode uint
const (
	LightMode BeeNodeMode = iota
	FullMode
	DevMode
	UltraLightMode
)

func (BeeNodeMode) String added in v1.4.1

func (b BeeNodeMode) String() string

type Peer added in v1.0.0

type Peer struct {
	Address  swarm.Address `json:"address"`
	FullNode bool          `json:"fullNode"`
}

Peer holds information about a Peer.

type Service

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

Service implements http.Handler interface to be used in HTTP server.

func New

func New(publicKey, pssPublicKey ecdsa.PublicKey, ethereumAddress common.Address, logger logging.Logger, tracer *tracing.Tracer, corsAllowedOrigins []string, blockTime *big.Int, transaction transaction.Service, chainBackend transaction.Backend, restrict bool, auth authenticator, gatewayMode bool, beeMode BeeNodeMode, chainID int64) *Service

New creates a new Debug API Service with only basic routers enabled in order to expose /addresses, /health endpoints, Go metrics and pprof. It is useful to expose these endpoints before all dependencies are configured and injected to have access to basic debugging tools and /health endpoint.

func (*Service) Configure added in v0.5.3

func (s *Service) Configure(overlay swarm.Address, p2p p2p.DebugService, pingpong pingpong.Interface, topologyDriver topology.Driver, lightNodes *lightnode.Container, storer storage.Storer, tags *tags.Tags, accounting accounting.Interface, pseudosettle settlement.Interface, swapEnabled bool, chequebookEnabled bool, swap swap.Interface, chequebook chequebook.Service, batchStore postage.Storer, post postage.Service, postageContract postagecontract.Interface, traverser traversal.Traverser, erc20Service erc20.Service)

Configure injects required dependencies and configuration parameters and constructs HTTP routes that depend on them. It is intended and safe to call this method only once.

func (*Service) MustRegisterMetrics

func (s *Service) MustRegisterMetrics(cs ...prometheus.Collector)

func (*Service) ServeHTTP added in v0.5.3

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler interface.

Jump to

Keyboard shortcuts

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