sender

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Balance          prometheus.Gauge
	RequestSent      prometheus.Counter
	RequestConfirmed prometheus.Counter
	RequestFailed    prometheus.Counter
}

Metrics data

type Sender

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

Sender gets MNTP sendings from DB and performs sending, controlling current contract's MNTP balance

func New

func New(
	dao db.DAO,
	contr *contract.Contract,
	alerter alert.Alerter,
	logger *logrus.Entry,
) *Sender

New instance

func (*Sender) AddMetrics

func (s *Sender) AddMetrics(m *Metrics)

AddMetrics adds metrics counters and should be called before service launch

func (*Sender) Task

func (s *Sender) Task(token *gotask.Token)

Task loop

Jump to

Keyboard shortcuts

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