wgconf

package
v0.0.0-...-10b46ab Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProbeParserMismatch = errors.New("probe parser mismatch")

Functions

func RegisterParser

func RegisterParser(name string, parser Parser)

Types

type Config

type Config struct {
	Interface string
	WireGuard wgtypes.Config
	Network   NetworkConfig
}

func Parse

func Parse(ctx context.Context, parser string, ifce, path string) (conf *Config, err error)

type NetworkConfig

type NetworkConfig interface {
	ApplyNetworkConfig() error
}

type Parser

type Parser func(ctx context.Context) (conf *Config, err error)

type ParserOptions

type ParserOptions struct {
	ProbeParser bool
	Path        string
	Interface   string
}

func ExtractParserOptions

func ExtractParserOptions(ctx context.Context) (po *ParserOptions)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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