package
0.0.9
Repository: https://github.com/dvnetwork/go-openvpn.git
Documentation: pkg.go.dev

# Functions

NewManagement creates new manager for given sock address, uses given log prefix for logging and takes a list of middlewares.

# Variables

LocalhostOnRandomPort defines localhost address with randomly bound port.

# Structs

Addr struct represents local address on which listener waits for incoming management connections.
Management structure represents connection and interface to openvpn management.
MockConnection is mock openvpn management interface used for middleware testing.

# Interfaces

CommandWriter represents openvpn management interface abstraction for middlewares to be able to send commands to openvpn process.
Middleware used to control openvpn process through management interface It's guaranteed that ConsumeLine callback will be called AFTER Start callback is finished CommandWriter passed on Stop callback can be already closed - expect errors when sending commands For efficiency and simplicity purposes ConsumeLine for each middleware is called from the same goroutine which consumes events from channel - avoid long running operations at all costs.