Documentation ¶
Index ¶
- func CreatePayPathForms(nodepaths [][]*payroutes.PayRelayNode, payamt *fields.Amount, ...) *protocol.PayPathForms
- func CreatePayPathFormsBySingleNodePath(node *payroutes.PayRelayNode, payamt *fields.Amount, paysat *fields.Satoshi) *protocol.PayPathForms
- type Servicer
- func (s *Servicer) AddCustomerToPool(newcur *chanpay.Customer) error
- func (s *Servicer) FindAndStartBusinessExclusiveWithOneCustomersByAddress(addr fields.Address, payamt *fields.Amount) (*chanpay.Customer, error)
- func (s *Servicer) FindCustomersByAddress(addr fields.Address) []*chanpay.Customer
- func (s *Servicer) FindCustomersByChannel(cid fields.ChannelId) *chanpay.Customer
- func (s *Servicer) GetLocalServiceNode() (*payroutes.PayRelayNode, error)
- func (s *Servicer) InitializeChannelSide(side *chanpay.ChannelSideConn, remoteAddress fields.Address, weIsLeft bool) error
- func (s *Servicer) LoadRoutesUpdate()
- func (s *Servicer) LoginNewCustomer(newcur *chanpay.Customer) error
- func (s *Servicer) MsgHandlerClientInitiateReconciliation(newcur *chanpay.Customer, msg *protocol.MsgClientInitiateReconciliation)
- func (s *Servicer) MsgHandlerRequestInitiatePayment(payuser *chanpay.Customer, upstreamSide *chanpay.RelayPaySettleNoder, ...)
- func (s *Servicer) MsgHandlerRequestPrequeryPayment(newcur *chanpay.Customer, msg *protocol.MsgRequestPrequeryPayment)
- func (s *Servicer) RemoveCustomerFromPool(cur *chanpay.Customer)
- func (s *Servicer) RemoveCustomerFromPoolUnsafe(cur *chanpay.Customer)
- func (s *Servicer) SetDataSource(billstore chanpay.DataSourceOfBalanceBill, ...)
- func (s *Servicer) Start()
- type ServicerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePayPathForms ¶
func CreatePayPathForms(nodepaths [][]*payroutes.PayRelayNode, payamt *fields.Amount, paysat *fields.Satoshi) *protocol.PayPathForms
Create multiple paths
func CreatePayPathFormsBySingleNodePath ¶
func CreatePayPathFormsBySingleNodePath(node *payroutes.PayRelayNode, payamt *fields.Amount, paysat *fields.Satoshi) *protocol.PayPathForms
Create a single path
Types ¶
type Servicer ¶
type Servicer struct {
// contains filtered or unexported fields
}
func NewServicer ¶
func NewServicer(cnf *ServicerConfig) *Servicer
func (*Servicer) AddCustomerToPool ¶
Add customers to the connection management pool and return to the old
func (*Servicer) FindAndStartBusinessExclusiveWithOneCustomersByAddress ¶
func (s *Servicer) FindAndStartBusinessExclusiveWithOneCustomersByAddress(addr fields.Address, payamt *fields.Amount) (*chanpay.Customer, error)
Find the client connection with the largest channel capacity Query client connections
func (*Servicer) FindCustomersByAddress ¶
Query client connections
func (*Servicer) FindCustomersByChannel ¶
Query client connections
func (*Servicer) GetLocalServiceNode ¶
func (s *Servicer) GetLocalServiceNode() (*payroutes.PayRelayNode, error)
Set data source interface
func (*Servicer) InitializeChannelSide ¶
func (s *Servicer) InitializeChannelSide(side *chanpay.ChannelSideConn, remoteAddress fields.Address, weIsLeft bool) error
Initialize channel
func (*Servicer) LoginNewCustomer ¶
New login to a client
func (*Servicer) MsgHandlerClientInitiateReconciliation ¶
func (s *Servicer) MsgHandlerClientInitiateReconciliation(newcur *chanpay.Customer, msg *protocol.MsgClientInitiateReconciliation)
*
- 发起对账处理
func (*Servicer) MsgHandlerRequestInitiatePayment ¶
func (s *Servicer) MsgHandlerRequestInitiatePayment(payuser *chanpay.Customer, upstreamSide *chanpay.RelayPaySettleNoder, msg *protocol.MsgRequestInitiatePayment)
*
- 发起支付
func (*Servicer) MsgHandlerRequestPrequeryPayment ¶
func (s *Servicer) MsgHandlerRequestPrequeryPayment(newcur *chanpay.Customer, msg *protocol.MsgRequestPrequeryPayment)
*
- 预查询支付处理
func (*Servicer) RemoveCustomerFromPool ¶
Remove from management pool
func (*Servicer) RemoveCustomerFromPoolUnsafe ¶
Remove from management pool
func (*Servicer) SetDataSource ¶
func (s *Servicer) SetDataSource( billstore chanpay.DataSourceOfBalanceBill, chanset chanpay.DataSourceOfServicerPayChannelSetup, signmachine chanpay.DataSourceOfSignatureMachine, )
Set data source interface
type ServicerConfig ¶
type ServicerConfig struct { DebugTest bool WssListenPort int PaySourceDataDir string // Payment data storage RoutesSourceDataDir string // Routing data storage SelfIdentificationName string // Local service provider identification name LoadRoutesUrl string // Send routing data FullNodeRpcUrl string // Hacash all node data interface address // Data modification ServiceCustomerChannelsAdd string // List of customer service channels to add ServiceCustomerChannelsCancel string // Cancel service // Node settlement channel profile RelaySettlementChannelsJsonFile string // Signer private key list SignatureMachinePrivateKeySetupList string }
func NewEmptyServicerConfig ¶
func NewEmptyServicerConfig() *ServicerConfig
func NewServicerConfig ¶
func NewServicerConfig(cnffile *sys.Inicnf) *ServicerConfig
Click to show internal directories.
Click to hide internal directories.