target

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 10 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 {
	RetryInterval time.Duration `yaml:"retryInterval" default:"60s"`
	NodeRecords   []string      `yaml:"nodeRecords"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Coordinator

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

func NewCoordinator

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

func (*Coordinator) SendTransactionsToPeers

func (c *Coordinator) SendTransactionsToPeers(ctx context.Context, transactions *mimicry.Transactions) error

func (*Coordinator) Start

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

func (*Coordinator) Stop

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

type CoordinatorStatus

type CoordinatorStatus struct {
	ConnectedPeers    int
	DisconnectedPeers int
}

type Metrics

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

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) AddTransactions

func (m *Metrics) AddTransactions(count int, status string)

func (*Metrics) SetPeers

func (m *Metrics) SetPeers(count int, status string)

type Peer

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

func NewPeer

func NewPeer(ctx context.Context, log logrus.FieldLogger, nodeRecord string) (*Peer, error)

func (*Peer) SendTransactions

func (p *Peer) SendTransactions(ctx context.Context, transactions *mimicry.Transactions) error

func (*Peer) Start

func (p *Peer) Start(ctx context.Context) (<-chan error, error)

func (*Peer) Stop

func (p *Peer) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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