Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InPayment ¶
type InPayment interface { Receive(promise Promise) (*big.Int, error) AutoCash(cashInterval time.Duration, maxUncashed *big.Int) Stop() }
自动刷卡(延迟)入站支付系统的支付接口
type OutPayment ¶
type OutPayment interface { Issue(amount *big.Int) (promise Promise, err error) AutoDeposit(interval time.Duration, threshold, buffer *big.Int) Stop() }
自动存款(延迟)出站支付系统的出站支付接口
type Payment ¶
type Payment struct { Out OutPayment //传出付款处理程序 In InPayment //入站付款经办人 Buys, Sells bool }
付款处理程序
type Profile ¶
type Profile struct { BuyAt *big.Int //接受的块最大价格 SellAt *big.Int //大宗商品报价 PayAt uint //触发付款请求的阈值 DropAt uint //触发断开连接的阈值 }
配置文件-公共交换配置文件 交换的公共参数,握手中传递的可序列化配置结构
type Strategy ¶
type Strategy struct { AutoCashInterval time.Duration //自动清除的默认间隔 AutoCashThreshold *big.Int //触发自动清除的阈值(wei) AutoDepositInterval time.Duration //自动清除的默认间隔 AutoDepositThreshold *big.Int //触发自动报告的阈值(wei) AutoDepositBuffer *big.Int //剩余用于叉保护等的缓冲器(WEI) }
策略封装了与 自动存款和自动兑现
Click to show internal directories.
Click to hide internal directories.