server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: LGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGRPCPort int = 9632
View Source
const DefaultJSONRPCPort int = 8545

Variables

This section is empty.

Functions

func SetupDataDir

func SetupDataDir(dataDir string, paths []string) error

SetupDataDir sets up the polygon-sdk data directory and sub-folders

Types

type Config

type Config struct {
	Chain *chain.Chain

	JSONRPCAddr    *net.TCPAddr
	GRPCAddr       *net.TCPAddr
	LibP2PAddr     *net.TCPAddr
	Telemetry      *Telemetry
	Network        *network.Config
	DataDir        string
	Seal           bool
	Locals         []types.Address
	NoLocals       bool
	PriceLimit     uint64
	MaxSlots       uint64
	SecretsManager *secrets.SecretsManagerConfig
}

Config is used to parametrize the minimal client

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default config for JSON-RPC, GRPC (ports) and Networking

type Entry

type Entry struct {
	Enabled bool
	Config  map[string]interface{}
}

Entry is a backend configuration entry

type Server

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

Minimal is the central manager of the blockchain client

func NewServer

func NewServer(logger hclog.Logger, config *Config) (*Server, error)

NewServer creates a new Minimal server, using the passed in configuration

func (*Server) Chain

func (s *Server) Chain() *chain.Chain

Chain returns the chain object of the client

func (*Server) Close

func (s *Server) Close()

Close closes the Minimal server (blockchain, networking, consensus)

func (*Server) Join

func (s *Server) Join(addr0 string, dur time.Duration) error

type Telemetry

type Telemetry struct {
	PrometheusAddr *net.TCPAddr
}

Telemetry holds the config details for metric services

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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