plugins

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const MaxBaseTimeoutSec = 5 * 60 // a max base time out of 5 min
View Source
const NetworkCheckError = "Error"

NetworkCheckError is a status for when the NetworkCheck Plugin has had an error making an out going connection indicating it may be offline

View Source
const NetworkCheckPeriod = time.Minute
View Source
const NetworkCheckSuccess = "Success"

NetworkCheckSuccess is a status for when the NetworkCheck Plugin has had a successful message from a peer, indicating it is online right now

View Source
const PriorityQueueTimeSinceQualifierHours float64 = 168

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	Start()
	Shutdown()
	Id() PluginID
}

Plugin is the interface for a plugin

func Get

func Get(id PluginID, bus event.Manager, acn connectivity.ACN, onion string) (Plugin, error)

Get is a plugin factory for the requested plugin

func NewAntiSpam added in v0.18.2

func NewAntiSpam(bus event.Manager) Plugin

NewAntiSpam returns a Plugin that when started will trigger antispam payments on a regular interval

func NewConnectionRetry added in v0.3.1

func NewConnectionRetry(bus event.Manager, onion string) Plugin

NewConnectionRetry returns a Plugin that when started will retry connecting to contacts with a failedCount timing

func NewHeartbeat added in v0.19.5

func NewHeartbeat(bus event.Manager) Plugin

NewHeartbeat returns a Plugin that when started will trigger heartbeat checks on a regular interval

func NewNetworkCheck added in v0.3.3

func NewNetworkCheck(onion string, bus event.Manager, acn connectivity.ACN) Plugin

NewNetworkCheck returns a Plugin that when started will attempt various network tests

type PluginID

type PluginID int

PluginID is used as an ID for signaling plugin activities

const (
	CONNECTIONRETRY PluginID = iota
	NETWORKCHECK
	ANTISPAM
	HEARTBEAT
)

These are the plugin IDs for the supplied plugins

Jump to

Keyboard shortcuts

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