2
0
mirror of https://github.com/edouardparis/lntop synced 2024-11-06 03:20:21 +00:00
lntop/events/events.go

30 lines
747 B
Go
Raw Normal View History

2019-03-26 09:06:32 +00:00
package events
2019-03-27 08:58:34 +00:00
const (
2019-04-15 11:34:29 +00:00
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"
2019-04-15 11:34:29 +00:00
WalletBalanceUpdated = "wallet.balance.updated"
2021-05-09 21:37:01 +00:00
RoutingEventUpdated = "routing.event.updated"
2019-03-27 08:58:34 +00:00
)
type Event struct {
Type string
ID string
2021-05-09 21:37:01 +00:00
Data interface{}
2019-03-27 08:58:34 +00:00
}
func New(kind string) *Event {
return &Event{Type: kind}
}
2021-05-09 21:37:01 +00:00
func NewWithData(kind string, data interface{}) *Event {
return &Event{Type: kind, Data: data}
}