dynamic

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInterval = time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

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

func NewRoute

func NewRoute(
	rt *route.Route,
	routeRefCounter *refcounter.RouteRefCounter,
	allowedIPsRefCounter *refcounter.AllowedIPsRefCounter,
	interval time.Duration,
	statusRecorder *peer.Status,
	wgInterface iface.IWGIface,
	resolverAddr string,
) *Route

func (*Route) AddAllowedIPs

func (r *Route) AddAllowedIPs(peerKey string) error

func (*Route) AddRoute

func (r *Route) AddRoute(ctx context.Context) error

func (*Route) RemoveAllowedIPs

func (r *Route) RemoveAllowedIPs() error

func (*Route) RemoveRoute

func (r *Route) RemoveRoute() error

RemoveRoute will stop the dynamic resolver and remove all dynamic routes. It doesn't touch allowed IPs, these should be removed separately and before calling this method.

func (*Route) String

func (r *Route) String() string

Jump to

Keyboard shortcuts

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