Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelInfo ¶
type ChannelInfo struct { // ChannelPoint is the outpoint of the channel's funding transaction. ChannelPoint string // MonitoredFor is the amount of time the channel's uptime has been // monitored by lnd. MonitoredFor time.Duration // Uptime is the total amount of time the channel's remote peer has // been online for. Uptime time.Duration // VolumeIncoming is the volume in millisatoshis that the channel has // forwarded through the node as the incoming channel. VolumeIncoming lnwire.MilliSatoshi // VolumeOutgoing is the volume in millisatoshis that the channel has // forwarded through the node as the outgoing channel. VolumeOutgoing lnwire.MilliSatoshi // FeesEarned is the total fees earned by the channel while routing. // Note that fees are split evenly between incoming and outgoing // channels. FeesEarned lnwire.MilliSatoshi // Confirmations is the number of confirmations the funding transction // has. Confirmations uint32 // Private indicates whether the channel is private. Private bool }
ChannelInfo provides a set of performance metrics for a lightning channel.
func GetChannels ¶
func GetChannels(cfg *Config) ([]*ChannelInfo, error)
GetChannels returns an array of channel insights.
type Config ¶
type Config struct { // OpenChannels is a function which returns all of our currently open, // public and private channels. OpenChannels func() ([]lndclient.ChannelInfo, error) // CurrentHeight is a function which returns the current block // currentHeight. CurrentHeight func() (uint32, error) // RevenueReport is a report our channels revenue. RevenueReport *revenue.Report }
Config provides insights with everything it needs to obtain channel insights.
Click to show internal directories.
Click to hide internal directories.