Documentation ¶
Index ¶
- Constants
- type Nexus
- func (o *Nexus) IsLayerMessage(message message_base.MoneysocketMessage) bool
- func (o *Nexus) NotifyPong()
- func (o *Nexus) NotifyProvider()
- func (o *Nexus) NotifyProviderNotReady()
- func (o *Nexus) NotifyProviderReady()
- func (o *Nexus) OnBinMessage(belowNexus nexus.Nexus, msg []byte)
- func (o *Nexus) OnMessage(belowNexus nexus.Nexus, msg message_base.MoneysocketMessage)
- func (o *Nexus) ProviderNowReady()
- func (o *Nexus) WaitForConsumer(providerFinishedCb func(nexus2 nexus.Nexus))
- type TransactNexus
- func (p *TransactNexus) HandleLayerRequest(req request.MoneysocketRequest)
- func (p *TransactNexus) IsLayerMessage(message msg.MoneysocketMessage) bool
- func (p *TransactNexus) NotifyInvoice(bolt11, requestReferenceUUID string) error
- func (p *TransactNexus) NotifyPreimage(preimage, requestReferenceUUID string) error
- func (p *TransactNexus) NotifyProviderInfo(seed beacon.SharedSeed) error
- func (p *TransactNexus) OnBinMessage(baseNexus nexus.Nexus, msg []byte)
- func (p *TransactNexus) OnMessage(belowNexus nexus.Nexus, message msg.MoneysocketMessage)
Constants ¶
const NexusName = "ProviderNexus"
NexusName is the ProviderNexus.
const TransactNexusName = "ProviderTransactNexus"
TransactNexusName the name of the provider transaction.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Nexus ¶ added in v0.54.0
type Nexus struct { *base.NexusBase // RequestReferenceUUID is the reference uuid RequestReferenceUUID string // ProviderFinishedCb is the callback for when providers finish ProviderFinishedCb func(nx nexus.Nexus) // contains filtered or unexported fields }
Nexus is the provider.
func NewProviderNexus ¶
NewProviderNexus creates a new nexus.
func (*Nexus) IsLayerMessage ¶ added in v0.54.0
func (o *Nexus) IsLayerMessage(message message_base.MoneysocketMessage) bool
IsLayerMessage decides if a message should be processed by a layer.
func (*Nexus) NotifyPong ¶ added in v0.54.0
func (o *Nexus) NotifyPong()
NotifyPong sends a pong message.
func (*Nexus) NotifyProvider ¶ added in v0.54.0
func (o *Nexus) NotifyProvider()
NotifyProvider sends a notification to a provider.
func (*Nexus) NotifyProviderNotReady ¶ added in v0.54.0
func (o *Nexus) NotifyProviderNotReady()
NotifyProviderNotReady notifies a provider is not ready yet.
func (*Nexus) NotifyProviderReady ¶ added in v0.54.0
func (o *Nexus) NotifyProviderReady()
NotifyProviderReady notifies provider is ready.
func (*Nexus) OnBinMessage ¶ added in v0.54.0
OnBinMessage calls the binary message handler.
func (*Nexus) OnMessage ¶ added in v0.54.0
func (o *Nexus) OnMessage(belowNexus nexus.Nexus, msg message_base.MoneysocketMessage)
OnMessage processes the message for this layer.
func (*Nexus) ProviderNowReady ¶ added in v0.54.0
func (o *Nexus) ProviderNowReady()
ProviderNowReady notifies provider is ready.
func (*Nexus) WaitForConsumer ¶ added in v0.54.0
WaitForConsumer notifies the providerFinishedCb.
type TransactNexus ¶ added in v0.54.0
type TransactNexus struct { *base.NexusBase HandleInvoiceRequest compat.HandleInvoiceRequest HandlePayRequest compat.HandlePayRequest }
TransactNexus is the provider transact nexus nam.
func NewProviderTransactNexus ¶
func NewProviderTransactNexus(belowNexus nexus.Nexus, layer layer.Base) *TransactNexus
NewProviderTransactNexus creates a new TransactNexus.
func (*TransactNexus) HandleLayerRequest ¶ added in v0.54.0
func (p *TransactNexus) HandleLayerRequest(req request.MoneysocketRequest)
HandleLayerRequest handles a layer request.
func (*TransactNexus) IsLayerMessage ¶ added in v0.54.0
func (p *TransactNexus) IsLayerMessage(message msg.MoneysocketMessage) bool
IsLayerMessage checkks if a message can be processed by this layer.
func (*TransactNexus) NotifyInvoice ¶ added in v0.54.0
func (p *TransactNexus) NotifyInvoice(bolt11, requestReferenceUUID string) error
NotifyInvoice notifies a new invoice.
func (*TransactNexus) NotifyPreimage ¶ added in v0.54.0
func (p *TransactNexus) NotifyPreimage(preimage, requestReferenceUUID string) error
NotifyPreimage notifies a preimage.
func (*TransactNexus) NotifyProviderInfo ¶ added in v0.54.0
func (p *TransactNexus) NotifyProviderInfo(seed beacon.SharedSeed) error
NotifyProviderInfo notifies a provider info.
func (*TransactNexus) OnBinMessage ¶ added in v0.54.0
func (p *TransactNexus) OnBinMessage(baseNexus nexus.Nexus, msg []byte)
OnBinMessage processes a bin message.
func (*TransactNexus) OnMessage ¶ added in v0.54.0
func (p *TransactNexus) OnMessage(belowNexus nexus.Nexus, message msg.MoneysocketMessage)
OnMessage processes a message.