api

package
v2.0.0-...-9e187c9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: LGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHandler

func HTTPHandler(logLevel *slog.LevelVar) http.Handler

func New

func New(
	repo *chain.Repository,
	stater *state.Stater,
	txPool *txpool.TxPool,
	logDB *logdb.LogDB,
	bft bft.Finalizer,
	nw node.Network,
	forkConfig thor.ForkConfig,
	allowedOrigins string,
	backtraceLimit uint32,
	callGasLimit uint64,
	pprofOn bool,
	skipLogs bool,
	allowCustomTracer bool,
	enableReqLogger bool,
	enableMetrics bool,
	logsLimit uint64,
	allowedTracers map[string]interface{},
	soloMode bool,
) (http.HandlerFunc, func())

New return api router

func RequestLoggerHandler

func RequestLoggerHandler(handler http.Handler, logger log.Logger) http.Handler

RequestLoggerHandler returns a http handler to ensure requests are syphoned into the writer

func StartAdminServer

func StartAdminServer(addr string, logLevel *slog.LevelVar) (string, func(), error)

func StartMetricsServer

func StartMetricsServer(addr string) (string, func(), error)

Types

This section is empty.

Directories

Path Synopsis
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>
Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>

Jump to

Keyboard shortcuts

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