mirror of
https://github.com/edouardparis/lntop
synced 2024-11-09 19:11:05 +00:00
30 lines
747 B
Go
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}
|
|
}
|