discovery

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.0 Imports: 20 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 {
	LoggingLevel string  `yaml:"logging" default:"info"`
	MetricsAddr  string  `yaml:"metricsAddr" default:":9090"`
	PProfAddr    *string `yaml:"pprofAddr"`

	// P2P configuration
	P2P p2p.Config `yaml:"p2p"`

	// Coordinator configuration
	Coordinator coordinator.Config `yaml:"coordinator"`
}

func (*Config) ApplyOverrides added in v1.0.15

func (c *Config) ApplyOverrides(o *Override, log logrus.FieldLogger) error

ApplyOverrides applies any overrides to the config.

func (*Config) Validate

func (c *Config) Validate() error

type Discovery

type Discovery struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, log logrus.FieldLogger, config *Config, overrides *Override) (*Discovery, error)

func (*Discovery) ServeMetrics

func (d *Discovery) ServeMetrics(ctx context.Context) error

func (*Discovery) ServePProf

func (d *Discovery) ServePProf(ctx context.Context) error

func (*Discovery) Start

func (d *Discovery) Start(ctx context.Context) error

type Metrics

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

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) AddDiscoveredNodeRecord

func (m *Metrics) AddDiscoveredNodeRecord(count int, protocol string)

func (*Metrics) AddNodeRecordStatus

func (m *Metrics) AddNodeRecordStatus(count int, networkID, forkIDHash string)

type Override added in v1.0.15

type Override struct {
	MetricsAddr struct {
		Enabled bool
		Value   string
	}
}

Override is the set of overrides for the discovery command.

Directories

Path Synopsis
p2p

Jump to

Keyboard shortcuts

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