events

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventPublisher

func NewEventPublisher() *eventPublisher

Types

type ChannelBackupEvent

type ChannelBackupEvent struct {
	Channels []ChannelBackupInfo `json:"channels"`
}

type ChannelBackupInfo

type ChannelBackupInfo struct {
	ChannelID     string `json:"channel_id"`
	NodeID        string `json:"node_id"`
	PeerID        string `json:"peer_id"`
	ChannelSize   uint64 `json:"channel_size"`
	FundingTxID   string `json:"funding_tx_id"`
	FundingTxVout uint32 `json:"funding_tx_vout"`
}

type Event

type Event struct {
	Event      string      `json:"event"`
	Properties interface{} `json:"properties,omitempty"`
}

type EventPublisher

type EventPublisher interface {
	RegisterSubscriber(eventListener EventSubscriber)
	RemoveSubscriber(eventListener EventSubscriber)
	Publish(event *Event)
	SetGlobalProperty(key string, value interface{})
}

type EventSubscriber

type EventSubscriber interface {
	ConsumeEvent(ctx context.Context, event *Event, globalProperties map[string]interface{}) error
}

type PaymentReceivedEventProperties

type PaymentReceivedEventProperties struct {
	PaymentHash string `json:"payment_hash"`
}

type PaymentSentEventProperties

type PaymentSentEventProperties struct {
	PaymentHash string `json:"payment_hash"`
	Duration    uint64 `json:"duration"`
}

Jump to

Keyboard shortcuts

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