webapi

package
v1.0.1-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Component *app.Component
)
View Source
var ParamsWebAPI = &ParametersWebAPI{
	Auth: authentication.AuthConfiguration{
		Scheme: "jwt",
		JWTConfig: authentication.JWTAuthConfiguration{
			Duration: 24 * time.Hour,
		},
	},
}

Functions

func CreateEchoSwagger

func CreateEchoSwagger(e *echo.Echo, version string) echoswagger.ApiRoot

func NewEcho

func NewEcho(params *ParametersWebAPI, metrics *metrics.ChainMetricsProvider, log *logger.Logger) *echo.Echo

Types

type ParametersJSONRPC

type ParametersJSONRPC struct {
	MaxBlocksInLogsFilterRange int `default:"1000" usage:"maximum amount of blocks in eth_getLogs filter range"`
	MaxLogsInResult            int `default:"10000" usage:"maximum amount of logs in eth_getLogs result"`
}

type ParametersWebAPI

type ParametersWebAPI struct {
	Enabled                   bool                             `default:"true" usage:"whether the web api plugin is enabled"`
	BindAddress               string                           `default:"0.0.0.0:9090" usage:"the bind address for the node web api"`
	Auth                      authentication.AuthConfiguration `usage:"configures the authentication for the API service"`
	IndexDbPath               string                           `` /* 128-byte string literal not displayed */
	Limits                    ParametersWebAPILimits
	DebugRequestLoggerEnabled bool `default:"false" usage:"whether the debug logging for requests should be enabled"`
}

type ParametersWebAPILimits

type ParametersWebAPILimits struct {
	Timeout                        time.Duration `default:"30s" usage:"the timeout after which a long running operation will be canceled"`
	ReadTimeout                    time.Duration `default:"10s" usage:"the read timeout for the HTTP request body"`
	WriteTimeout                   time.Duration `default:"60s" usage:"the write timeout for the HTTP response body"`
	MaxBodyLength                  string        `default:"2M" usage:"the maximum number of characters that the body of an API call may contain"`
	MaxTopicSubscriptionsPerClient int           `default:"0" usage:"defines the max amount of subscriptions per client. 0 = deactivated (default)"`
	ConfirmedStateLagThreshold     uint32        `default:"2" usage:"the threshold that define a chain is unsynchronized"`
	Jsonrpc                        ParametersJSONRPC
}

Jump to

Keyboard shortcuts

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