servicer

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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

func (s *Servicer) AddCustomerToPool(newcur *chanpay.Customer) error

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

func (s *Servicer) FindCustomersByAddress(addr fields.Address) []*chanpay.Customer

Query client connections

func (*Servicer) FindCustomersByChannel

func (s *Servicer) FindCustomersByChannel(cid fields.ChannelId) *chanpay.Customer

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) LoadRoutesUpdate

func (s *Servicer) LoadRoutesUpdate()

Load latest updates

func (*Servicer) LoginNewCustomer

func (s *Servicer) LoginNewCustomer(newcur *chanpay.Customer) error

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

func (s *Servicer) RemoveCustomerFromPool(cur *chanpay.Customer)

Remove from management pool

func (*Servicer) RemoveCustomerFromPoolUnsafe

func (s *Servicer) RemoveCustomerFromPoolUnsafe(cur *chanpay.Customer)

Remove from management pool

func (*Servicer) SetDataSource

Set data source interface

func (*Servicer) Start

func (s *Servicer) Start()

start-up

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL