Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) API() rpc.API
- func (s *Service) Address() common.Address
- func (s *Service) AvailableBalance() (*big.Int, error)
- func (s *Service) Balance() (*big.Int, error)
- func (s *Service) CashCheque(_ context.Context, _ boson.Address) (common.Hash, error)
- func (s *Service) GetPeerBalance(_ boson.Address) (*big.Int, error)
- func (s *Service) GetUnPaidBalance(_ boson.Address) (*big.Int, error)
- func (s *Service) Init() error
- func (s *Service) LastReceivedCheque(_ boson.Address) (*chequePkg.SignedCheque, error)
- func (s *Service) LastSentCheque(_ boson.Address) (*chequePkg.Cheque, error)
- func (s *Service) Metrics() []prometheus.Collector
- func (s *Service) Pay(_ context.Context, peer boson.Address, paymentThreshold *big.Int) error
- func (s *Service) PutRetrieveTraffic(peer boson.Address, traffic *big.Int) error
- func (s *Service) PutTransferTraffic(peer boson.Address, traffic *big.Int) error
- func (s *Service) RetrieveTraffic(_ boson.Address) (traffic *big.Int, err error)
- func (s *Service) SetNotifyPaymentFunc(notifyPaymentFunc settlement.NotifyPaymentFunc)
- func (s *Service) SettlementsReceived() (map[string]*big.Int, error)
- func (s *Service) SettlementsSent() (map[string]*big.Int, error)
- func (s *Service) TotalReceived(peer boson.Address) (totalReceived *big.Int, err error)
- func (s *Service) TotalSent(peer boson.Address) (totalSent *big.Int, err error)
- func (s *Service) TrafficCheques() ([]*traffic.TrafficCheque, error)
- func (s *Service) TrafficInfo() (*traffic.TrafficInfo, error)
- func (s *Service) TrafficInit() error
- func (s *Service) TransferTraffic(_ boson.Address) (traffic *big.Int, err error)
- func (s *Service) UpdatePeerBalance(_ boson.Address) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SettlementReceivedPrefix = "pseudosettle_total_received_" SettlementSentPrefix = "pseudosettle_total_sent_" )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AvailableBalance ¶
AvailableBalance Get actual available balance
func (*Service) CashCheque ¶
func (*Service) GetPeerBalance ¶
func (*Service) GetUnPaidBalance ¶
func (*Service) LastReceivedCheque ¶
func (*Service) LastSentCheque ¶
func (*Service) Metrics ¶
func (s *Service) Metrics() []prometheus.Collector
func (*Service) PutRetrieveTraffic ¶
func (*Service) PutTransferTraffic ¶
func (*Service) RetrieveTraffic ¶
func (*Service) SetNotifyPaymentFunc ¶
func (s *Service) SetNotifyPaymentFunc(notifyPaymentFunc settlement.NotifyPaymentFunc)
SetNotifyPaymentFunc sets the NotifyPaymentFunc to notify
func (*Service) SettlementsReceived ¶
SettlementsReceived returns all stored received settlement values for a given type of prefix
func (*Service) SettlementsSent ¶
SettlementsSent returns all stored sent settlement values for a given type of prefix
func (*Service) TotalReceived ¶
TotalReceived returns the total amount received from a peer
func (*Service) TrafficCheques ¶
func (s *Service) TrafficCheques() ([]*traffic.TrafficCheque, error)
func (*Service) TrafficInfo ¶
func (s *Service) TrafficInfo() (*traffic.TrafficInfo, error)
func (*Service) TrafficInit ¶
func (*Service) TransferTraffic ¶
Click to show internal directories.
Click to hide internal directories.