insights

package
v0.2.17-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

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