2
0
mirror of https://github.com/edouardparis/lntop synced 2024-11-09 19:11:05 +00:00
lntop/events/events.go
2021-06-09 14:32:37 +02:00

30 lines
747 B
Go

package events
const (
BlockReceived = "block.received"
ChannelActive = "channel.active"
ChannelBalanceUpdated = "channel.balance.updated"
ChannelInactive = "channel.inactive"
ChannelPending = "channel.pending"
InvoiceCreated = "invoice.created"
InvoiceSettled = "invoice.settled"
PeerUpdated = "peer.updated"
TransactionCreated = "transaction.created"
WalletBalanceUpdated = "wallet.balance.updated"
RoutingEventUpdated = "routing.event.updated"
)
type Event struct {
Type string
ID string
Data interface{}
}
func New(kind string) *Event {
return &Event{Type: kind}
}
func NewWithData(kind string, data interface{}) *Event {
return &Event{Type: kind, Data: data}
}