labels

package
v0.11.2-beta Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// MaxLength is the maximum length we allow for labels.
	MaxLength = 500

	// Reserved is used as a prefix to separate labels that are created by
	// loopd from those created by users.
	Reserved = "[reserved]"
)

Variables

View Source
var (
	// ErrLabelTooLong is returned when a label exceeds our length limit.
	ErrLabelTooLong = errors.New("label exceeds maximum length")

	// ErrReservedPrefix is returned when a label contains the prefix
	// which is reserved for internally produced labels.
	ErrReservedPrefix = errors.New("label contains reserved prefix")
)

Functions

func AutoOutLabel

func AutoOutLabel() string

AutoOutLabel returns a label with the reserved prefix that identifies automatically dispatched loop outs.

func LoopInHtlcLabel

func LoopInHtlcLabel(swapHash string) string

LoopInHtlcLabel returns the label used for loop in swaps to publish an HTLC.

func LoopInSweepTimeout

func LoopInSweepTimeout(swapHash string) string

LoopInSweepTimeout returns the label used for loop in swaps to sweep an HTLC that has timed out.

func LoopOutSweepSuccess

func LoopOutSweepSuccess(swapHash string) string

LoopOutSweepSuccess returns the label used for loop out swaps to sweep the HTLC in the success case.

func Validate

func Validate(label string) error

Validate checks that a label is of appropriate length and is not in our list of reserved labels.

Types

This section is empty.

Jump to

Keyboard shortcuts

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