node

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel            utils.LogLevel `mapstructure:"log-level"`
	HTTPPort            uint16         `mapstructure:"http-port"`
	WSPort              uint16         `mapstructure:"ws-port"`
	GRPCPort            uint16         `mapstructure:"grpc-port"`
	DatabasePath        string         `mapstructure:"db-path"`
	Network             utils.Network  `mapstructure:"network"`
	EthNode             string         `mapstructure:"eth-node"`
	Pprof               bool           `mapstructure:"pprof"`
	Colour              bool           `mapstructure:"colour"`
	PendingPollInterval time.Duration  `mapstructure:"pending-poll-interval"`
}

Config is the top-level juno configuration.

type Node

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

func New

func New(cfg *Config, version string) (*Node, error)

New sets the config and logger to the StarknetNode. Any errors while parsing the config on creating logger will be returned.

func (*Node) Config

func (n *Node) Config() Config

func (*Node) Run

func (n *Node) Run(ctx context.Context)

Run starts Juno node by opening the DB, initialising services. All the services blocking and any errors returned by service run function is logged. Run will wait for all services to return before exiting.

Jump to

Keyboard shortcuts

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