events

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventPublisher

func NewEventPublisher() *eventPublisher

Types

type ChannelBackup added in v1.10.0

type ChannelBackup struct {
	ChannelID         string `json:"channel_id"`
	PeerID            string `json:"peer_id"`
	PeerSocketAddress string `json:"peer_socket_address"`
	ChannelSize       uint64 `json:"channel_size"`
	FundingTxID       string `json:"funding_tx_id"`
	FundingTxVout     uint32 `json:"funding_tx_vout"`
}

type EncodedChannelMonitorBackup added in v1.10.0

type EncodedChannelMonitorBackup struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

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)
	PublishSync(event *Event)
	SetGlobalProperty(key string, value interface{})
}

type EventSubscriber

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

type StaticChannelsBackupEvent added in v1.10.0

type StaticChannelsBackupEvent struct {
	NodeID   string                        `json:"node_id"`
	Channels []ChannelBackup               `json:"channels"`
	Monitors []EncodedChannelMonitorBackup `json:"monitors"`
}

Jump to

Keyboard shortcuts

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