signal

package
v0.0.0-...-4461705 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func UseLogger

func UseLogger(logger bronlog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using bronlog.

Types

type Interceptor

type Interceptor struct {

	// Notifier handles sending shutdown notifications.
	Notifier Notifier
	// contains filtered or unexported fields
}

Interceptor contains channels and methods regarding application shutdown and interrupt signals.

func Intercept

func Intercept() (Interceptor, error)

Intercept starts the interception of interrupt signals and returns an `Interceptor` instance. Note that any previous active interceptor must be stopped before a new one can be created.

func (*Interceptor) Alive

func (c *Interceptor) Alive() bool

Alive returns true if the main interrupt handler has not been killed.

func (*Interceptor) Listening

func (c *Interceptor) Listening() bool

Listening returns true if the main interrupt handler has been started, and has not been killed.

func (*Interceptor) RequestShutdown

func (c *Interceptor) RequestShutdown()

RequestShutdown initiates a graceful shutdown from the application.

func (*Interceptor) ShutdownChannel

func (c *Interceptor) ShutdownChannel() <-chan struct{}

ShutdownChannel returns the channel that will be closed once the main interrupt handler has exited.

type Notifier

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

Notifier handles notifications about status of LND.

func (*Notifier) NotifyReady

func (notifier *Notifier) NotifyReady(walletUnlocked bool) error

NotifyReady notifies other applications that RPC is ready.

Jump to

Keyboard shortcuts

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