discovery

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 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) 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) (*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)

Directories

Path Synopsis
p2p

Jump to

Keyboard shortcuts

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