pricing

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: BSD-3-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	AnnouncePaymentThreshold(ctx context.Context, peer swarm.Address, paymentThreshold uint64) error
}

Interface is the main interface of the pricing protocol

type PaymentThresholdObserver

type PaymentThresholdObserver interface {
	NotifyPaymentThreshold(peer swarm.Address, paymentThreshold uint64) error
}

PaymentThresholdObserver is used for being notified of payment threshold updates

type Service

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

func New

func New(streamer p2p.Streamer, logger logging.Logger, paymentThreshold uint64) *Service

func (*Service) AnnouncePaymentThreshold

func (s *Service) AnnouncePaymentThreshold(ctx context.Context, peer swarm.Address, paymentThreshold uint64) error

AnnouncePaymentThreshold announces the payment threshold to per

func (*Service) Protocol

func (s *Service) Protocol() p2p.ProtocolSpec

func (*Service) SetPaymentThresholdObserver

func (s *Service) SetPaymentThresholdObserver(observer PaymentThresholdObserver)

SetPaymentThresholdObserver sets the PaymentThresholdObserver to be used when receiving a new payment threshold

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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