watchtower

package
v1.2.4-rc Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package watchtower continuously monitors firewall rules compliance of all connected peers, and disconnects peers which do not comply to the rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guard

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

Guard contains the state necessary to make connection pruning decisions.

func NewGuard

func NewGuard(
	ctx context.Context,
	duration time.Duration,
	firewall net.Firewall,
	connectionManager net.ConnectionManager,
) *Guard

NewGuard returns a new instance of Guard. Should only be called once per provider. Instantiating a new instance of Guard automatically runs it in the background for the lifetime of the client.

Jump to

Keyboard shortcuts

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