coordinator

package
v0.0.168 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-3.0 Imports: 13 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 {
	Address      string            `yaml:"address"`
	Headers      map[string]string `yaml:"headers"`
	TLS          bool              `yaml:"tls" default:"false"`
	NetworkIds   []uint64          `yaml:"networkIds"`
	ForkIDHashes []string          `yaml:"forkIdHashes"`
	Capabilities []string          `yaml:"capabilities"`
	MaxPeers     uint32            `yaml:"maxPeers" default:"100"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Coordinator

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

func NewCoordinator

func NewCoordinator(name string, config *Config, log logrus.FieldLogger) (*Coordinator, error)

func (*Coordinator) CoordinateExecutionNodeRecords

func (c *Coordinator) CoordinateExecutionNodeRecords(ctx context.Context, records []*xatu.CoordinatedNodeRecord) (*xatu.CoordinateExecutionNodeRecordsResponse, error)

func (*Coordinator) HandleExecutionNodeRecordStatus

func (c *Coordinator) HandleExecutionNodeRecordStatus(ctx context.Context, status *xatu.ExecutionNodeStatus) error

func (*Coordinator) Start

func (c *Coordinator) Start(ctx context.Context) error

func (*Coordinator) Stop

func (c *Coordinator) Stop(ctx context.Context) error

type Metrics

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

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) AddNodeRecordStatus

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

Jump to

Keyboard shortcuts

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