provider

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const NexusName = "ProviderNexus"

NexusName is the ProviderNexus.

View Source
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

func NewProviderNexus(belowNexus nexus.Nexus) *Nexus

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

func (o *Nexus) OnBinMessage(belowNexus nexus.Nexus, msg []byte)

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

func (o *Nexus) WaitForConsumer(providerFinishedCb func(nexus2 nexus.Nexus))

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.

Jump to

Keyboard shortcuts

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