channels

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const RetryTimeout = 30 * time.Second
View Source
const RetryTimes = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

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

func (*Channel) Context

func (channel *Channel) Context() *domain.Context

func (*Channel) IsNotRelay

func (channel *Channel) IsNotRelay() bool

func (*Channel) Relay

func (channel *Channel) Relay() error

func (*Channel) UpdateClient

func (channel *Channel) UpdateClient() error

func (*Channel) UpdateClientFrequency

func (channel *Channel) UpdateClientFrequency() uint64

type IChannel

type IChannel interface {
	UpdateClient() error
	Relay() error
	IsNotRelay() bool
	Context() *domain.Context
	UpdateClientFrequency() uint64
}

func NewChannel

func NewChannel(
	source repostitory.IChain,
	dest repostitory.IChain, height uint64, logger *log.Logger) (IChannel, error)

func NewMetricMW

func NewMetricMW(svc IChannel, metricsModel *merticsmodel.Model) IChannel

func NewWriterMW

func NewWriterMW(svc IChannel, chainName string, logger *log.Logger, homeDir, dir, filename string) IChannel

type Metric

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

func (*Metric) Context

func (m *Metric) Context() *domain.Context

func (*Metric) IsNotRelay

func (m *Metric) IsNotRelay() bool

func (*Metric) Relay

func (m *Metric) Relay() error

func (*Metric) UpdateClient

func (m *Metric) UpdateClient() error

func (*Metric) UpdateClientFrequency

func (m *Metric) UpdateClientFrequency() uint64

type Writer

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

func (*Writer) Context

func (w *Writer) Context() *domain.Context

func (*Writer) IsNotRelay

func (w *Writer) IsNotRelay() bool

func (*Writer) Relay

func (w *Writer) Relay() error

func (*Writer) UpdateClient

func (w *Writer) UpdateClient() error

func (*Writer) UpdateClientFrequency

func (w *Writer) UpdateClientFrequency() uint64

Jump to

Keyboard shortcuts

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