entities

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceReportCallback

type BalanceReportCallback func(ctx context.Context, report *ChannelBalanceReport) bool

type ChannelBalance

type ChannelBalance struct {
	Active  bool `json:"active"`
	Private bool `json:"private"`
	// Deprecated
	ActivePrevious bool `json:"active_previous"`

	LocalPubkey  string `json:"local_pubkey"`
	RemotePubkey string `json:"remote_pubkey"`
	ChanId       uint64 `json:"chan_id"`
	Capacity     uint64 `json:"capacity"`

	Nominator   uint64 `json:"nominator"`
	Denominator uint64 `json:"denominator"`

	// Deprecated
	NominatorDiff int64 `json:"nominator_diff"`
	// Deprecated
	DenominatorDiff int64 `json:"denominator_diff"`

	ActiveRemote bool `json:"active_remote"`
	// Deprecated
	ActiveRemotePrevious bool `json:"active_remote_previous"`
	ActiveLocal          bool `json:"active_local"`
	// Deprecated
	ActiveLocalPrevious bool `json:"active_local_previous"`
}

type ChannelBalanceReport

type ChannelBalanceReport struct {
	ReportingSettings
	Chain           string           `json:"chain"`   // should be bitcoin (bitcoin, litecoin)
	Network         string           `json:"network"` // should be mainnet (regtest, testnet, mainnet)
	PubKey          string           `json:"pubkey"`
	Timestamp       JsonTime         `json:"timestamp"`
	ChangedChannels []ChannelBalance `json:"changed_channels"`
	ClosedChannels  []ClosedChannel  `json:"closed_channels"`
}

type ClosedChannel

type ClosedChannel struct {
	ChannelId uint64 `json:"channel_id"`
}

type Interval

type Interval int
const (
	MANUAL_REQUEST Interval = iota
	TEN_SECONDS
	MINUTE
	HOUR
)

func (Interval) Duration

func (i Interval) Duration() time.Duration

func (*Interval) MarshalJSON

func (i *Interval) MarshalJSON() ([]byte, error)

func (*Interval) UnmarshalJSON

func (i *Interval) UnmarshalJSON(s []byte) (err error)

type JsonTime

type JsonTime time.Time

func (JsonTime) MarshalJSON

func (t JsonTime) MarshalJSON() ([]byte, error)

func (*JsonTime) UnmarshalJSON

func (t *JsonTime) UnmarshalJSON(s []byte) (err error)

type NodeIdentifier

type NodeIdentifier struct {
	Identifier string `json:"identifier"`
	UniqueId   string `json:"unique_id"`
}

type ReportingSettings

type ReportingSettings struct {
	GraphPollInterval    time.Duration `json:"-"`
	NoopInterval         time.Duration `json:"-"` // If that much time has passed send null report
	PollInterval         Interval      `json:"poll_interval"`
	AllowedEntropy       int           `json:"allowed_entropy"`        // 64 bits is the default
	AllowPrivateChannels bool          `json:"allow_private_channels"` // default is false
}

Jump to

Keyboard shortcuts

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