node

package
v0.0.0-...-1abf0d1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Package node is the main entry point, where the tendermint node service is constructed and the implementation of that service is defined.

Package node provides a high level wrapper around tendermint services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMetricsProvider

func DefaultMetricsProvider(cfg *config.InstrumentationConfig) metricsProvider

defaultMetricsProvider returns Metrics build using Prometheus client library if Prometheus is enabled. Otherwise, it returns no-op Metrics.

func New

func New(
	ctx context.Context,
	conf *config.Config,
	logger log.Logger,
	restartCh chan struct{},
	cf abciclient.Client,
	gen *types.GenesisDoc,
	tracerProviderOptions []trace.TracerProviderOption,
	nodeMetrics *NodeMetrics,
) (service.Service, error)

New constructs a tendermint node. The ClientCreator makes it possible to construct an ABCI application that runs in the same process as the tendermint node. The final option is a pointer to a Genesis document: if the value is nil, the genesis document is read from the file specified in the config, and otherwise the node uses value of the final argument.

func NewDefault

func NewDefault(
	ctx context.Context,
	conf *config.Config,
	logger log.Logger,
	restartCh chan struct{},
) (service.Service, error)

NewDefault constructs a tendermint node service for use in go process that host their own process-local tendermint node. This is equivalent to running tendermint in it's own process communicating to an external ABCI application.

Types

type NodeMetrics

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

func NoOpMetricsProvider

func NoOpMetricsProvider() *NodeMetrics

Jump to

Keyboard shortcuts

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