nodeinfo

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 15 Imported by: 0

README

Nodeinfo

Nodeinfo is an abstraction to gather data similar to lncli getnodeinfo periodically from nodes. Agent uses that only if you allow access to private data (--private flag). We need it to have a consistent state of the node because it could have unannounced channels. Without this we fallback to public data from the lightning network gossip.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalSettings

type GlobalSettings struct {
	// contains filtered or unexported fields
}

func NewGlobalSettings

func NewGlobalSettings() *GlobalSettings

func (*GlobalSettings) Delete

func (s *GlobalSettings) Delete(key string)

func (*GlobalSettings) Get

func (s *GlobalSettings) Get(key string) Settings

func (*GlobalSettings) GetKeys

func (s *GlobalSettings) GetKeys() []string

func (*GlobalSettings) Set

func (s *GlobalSettings) Set(key string, value Settings)

type NodeInfo

type NodeInfo struct {
	// contains filtered or unexported fields
}

func NewNodeInfo

func NewNodeInfo(ctx context.Context, monitoring *checkermonitoring.CheckerMonitoring) *NodeInfo

func (*NodeInfo) EventLoop

func (c *NodeInfo) EventLoop()

func (*NodeInfo) GetState

func (c *NodeInfo) GetState(
	pubKey string,
	uniqueId string,
	PollInterval entities.Interval,
	getApi entities.NewApiCall,
	optCallback entities.InfoCallback) (*entities.InfoReport, error)

func (*NodeInfo) IsSubscribed

func (c *NodeInfo) IsSubscribed(pubKey, uniqueId string) bool

Check if we are subscribed for a certain public key

func (*NodeInfo) OverrideLoopInterval

func (c *NodeInfo) OverrideLoopInterval(duration time.Duration)

WARNING: this should not be used except for unit testing

func (*NodeInfo) Subscribe

func (c *NodeInfo) Subscribe(
	pubKey string,
	uniqueId string,
	PollInterval entities.Interval,
	getApi entities.NewApiCall,
	callback entities.InfoCallback) error

Subscribe to notifications

func (*NodeInfo) Unsubscribe

func (c *NodeInfo) Unsubscribe(pubkey, uniqueId string) error

Unsubscribe from a pubkey

type Settings

type Settings struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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