pseudosettle

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 11 Imported by: 3

Documentation

Overview

Package pseudosettle implements a pretend settlement protocol where nodes send pretend payment messages consisting only of the payment amount. Its purpose is to be able to have the full payment / disconnect treshold machinery in place without having to send cheques or real values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Streamer p2p.Streamer
	Logger   logging.Logger
}

type Service

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

func New

func New(o Options) *Service

func (*Service) Metrics

func (s *Service) Metrics() []prometheus.Collector

func (*Service) Pay

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

Pay initiates a payment to the given peer

func (*Service) Protocol

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

func (*Service) SetPaymentObserver

func (s *Service) SetPaymentObserver(observer settlement.PaymentObserver)

SetPaymentObserver sets the payment observer which will be notified of incoming payments

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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