agreementsender

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ASError wraps errors returned from agreementsender package
	ASError = errs.Class("agreement sender error")
)

Functions

This section is empty.

Types

type AgreementSender

type AgreementSender struct {
	DB *psdb.DB
	// contains filtered or unexported fields
}

AgreementSender maintains variables required for reading bandwidth agreements from a DB and sending them to a Payers

func New

func New(log *zap.Logger, DB *psdb.DB, tc transport.Client, kad *kademlia.Kademlia, checkInterval time.Duration) *AgreementSender

New creates an Agreement Sender

func (*AgreementSender) Run

func (as *AgreementSender) Run(ctx context.Context) error

Run the agreement sender with a context to check for cancel

func (*AgreementSender) SettleAgreements

func (as *AgreementSender) SettleAgreements(ctx context.Context, satelliteID storj.NodeID, agreements []*psdb.Agreement)

SettleAgreements uploads agreements to the satellite

Jump to

Keyboard shortcuts

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