Documentation
¶
Index ¶
- func NewSettlement(opts ...Option) settlement.Interface
- type Option
- type Service
- func (s *Service) Pay(_ context.Context, peer swarm.Address, amount uint64) error
- func (s *Service) SetPaymentObserver(settlement.PaymentObserver)
- func (s *Service) SettlementsReceived() (map[string]uint64, error)
- func (s *Service) SettlementsSent() (map[string]uint64, error)
- func (s *Service) TotalReceived(peer swarm.Address) (totalSent uint64, err error)
- func (s *Service) TotalSent(peer swarm.Address) (totalSent uint64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSettlement ¶
func NewSettlement(opts ...Option) settlement.Interface
Newsettlement creates the mock settlement implementation
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is the option passed to the mock settlement service
func WithSettlementRecvFunc ¶
func WithSettlementSentFunc ¶
WithsettlementFunc sets the mock settlement function
func WithSettlementsRecvFunc ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the mock settlement service.
func (*Service) SetPaymentObserver ¶
func (s *Service) SetPaymentObserver(settlement.PaymentObserver)
func (*Service) SettlementsReceived ¶
func (*Service) SettlementsSent ¶
settlements is the mock function wrapper that calls the set implementation
func (*Service) TotalReceived ¶
Click to show internal directories.
Click to hide internal directories.