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(ctx context.Context, peer boson.Address) (common.Hash, error)
- func (s *Service) GetPeerBalance(peer boson.Address) (*big.Int, error)
- func (s *Service) GetUnPaidBalance(peer boson.Address) (*big.Int, error)
- func (s *Service) Init() error
- func (s *Service) LastReceivedCheque(peer boson.Address) (*chequePkg.SignedCheque, error)
- func (s *Service) LastSentCheque(peer boson.Address) (*chequePkg.Cheque, error)
- func (s *Service) Metrics() []prometheus.Collector
- func (s *Service) Pay(ctx 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(peer 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(peer boson.Address) (traffic *big.Int, err error)
- func (s *Service) UpdatePeerBalance(peer 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 ¶ added in v1.2.0
AvailableBalance Get actual available balance
func (*Service) CashCheque ¶ added in v1.2.0
func (*Service) GetPeerBalance ¶ added in v1.2.0
func (*Service) GetUnPaidBalance ¶ added in v1.2.0
func (*Service) LastReceivedCheque ¶ added in v1.2.0
func (*Service) LastSentCheque ¶ added in v1.2.0
func (*Service) Metrics ¶
func (s *Service) Metrics() []prometheus.Collector
func (*Service) PutRetrieveTraffic ¶ added in v1.2.0
func (*Service) PutTransferTraffic ¶ added in v1.2.0
func (*Service) RetrieveTraffic ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (s *Service) TrafficCheques() ([]*traffic.TrafficCheque, error)
func (*Service) TrafficInfo ¶ added in v1.2.0
func (s *Service) TrafficInfo() (*traffic.TrafficInfo, error)
func (*Service) TrafficInit ¶ added in v1.2.0
func (*Service) TransferTraffic ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.