server

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommand

func GetCommand() *cobra.Command

Types

type Config

type Config struct {
	GenesisPath              string          `json:"chain_config"`
	SecretsConfigPath        string          `json:"secrets_config"`
	DataDir                  string          `json:"data_dir"`
	BlockGasTarget           string          `json:"block_gas_target"`
	GRPCAddr                 string          `json:"grpc_addr"`
	JSONRPCAddr              string          `json:"jsonrpc_addr"`
	Telemetry                *Telemetry      `json:"telemetry"`
	Network                  *Network        `json:"network"`
	ShouldSeal               bool            `json:"seal"`
	TxPool                   *TxPool         `json:"tx_pool"`
	LogLevel                 string          `json:"log_level"`
	RestoreFile              string          `json:"restore_file"`
	BlockTime                uint64          `json:"block_time_s"`
	Headers                  *Headers        `json:"headers"`
	LogFilePath              string          `json:"log_to"`
	EnableGraphQL            bool            `json:"enable_graphql"`
	GraphQLAddr              string          `json:"graphql_addr"`
	JSONRPCBatchRequestLimit uint64          `json:"json_rpc_batch_request_limit" yaml:"json_rpc_batch_request_limit"`
	JSONRPCBlockRangeLimit   uint64          `json:"json_rpc_block_range_limit" yaml:"json_rpc_block_range_limit"`
	JSONNamespace            string          `json:"json_namespace" yaml:"json_namespace"`
	EnableWS                 bool            `json:"enable_ws" yaml:"enable_ws"`
	EnablePprof              bool            `json:"enable_pprof" yaml:"enable_pprof"`
	BlockBroadcast           bool            `json:"enable_block_broadcast" yaml:"enable_block_broadcast"`
	GPO                      gasprice.Config `json:"gas_price_oracle" yaml:"gas_price_oracle"`
}

Config defines the server configuration params

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default server configuration

type Headers

type Headers struct {
	AccessControlAllowOrigins []string `json:"access_control_allow_origins"`
}

Headers defines the HTTP response headers required to enable CORS.

type Network

type Network struct {
	IgnoreDiscoverCIDR string `json:"ignore_discover_cidr"`

	NoDiscover       bool   `json:"no_discover"`
	Libp2pAddr       string `json:"libp2p_addr"`
	NatAddr          string `json:"nat_addr"`
	DNSAddr          string `json:"dns_addr"`
	MaxPeers         int64  `json:"max_peers,omitempty"`
	MaxOutboundPeers int64  `json:"max_outbound_peers,omitempty"`
	MaxInboundPeers  int64  `json:"max_inbound_peers,omitempty"`
}

Network defines the network configuration params

type Telemetry

type Telemetry struct {
	PrometheusAddr string `json:"prometheus_addr"`
	EnableIOTimer  bool   `json:"prometheus_enable_disk_io_timer"`
	EnableJaeger   bool   `json:"enable_jaeger"`
	JaegerURL      string `json:"jaeger_url"`
}

Telemetry holds the config details for metric services.

type TxPool

type TxPool struct {
	PriceLimit            uint64 `json:"price_limit"`
	MaxSlots              uint64 `json:"max_slots"`
	PruneTickSeconds      uint64 `json:"prune_tick_seconds"`
	PromoteOutdateSeconds uint64 `json:"promote_outdate_seconds"`
}

TxPool defines the TxPool configuration params

Jump to

Keyboard shortcuts

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