Index | Files

package vpn

import ""

Package vpn provides an i3bar module for openvpn information.


Package Files


type Module Uses

type Module struct {
    // contains filtered or unexported fields

Module represents a VPN bar module.

func DefaultInterface Uses

func DefaultInterface() *Module

DefaultInterface constructs an instance of the VPN module for "tun0", the usual interface for VPNs.

func New Uses

func New(iface string) *Module

New constructs an instance of the VPN module for the specified interface.

func (*Module) Output Uses

func (m *Module) Output(outputFunc func(State) bar.Output) *Module

Output configures a module to display the output of a user-defined function.

func (*Module) Stream Uses

func (m *Module) Stream(s bar.Sink)

Stream starts the module.

type State Uses

type State int

State represents the vpn state.

const (
    Disconnected State = iota

Valid states for the vpn

func (State) Connected Uses

func (s State) Connected() bool

Connected returns true if the VPN is connected.

func (State) Disconnected Uses

func (s State) Disconnected() bool

Disconnected returns true if the VPN is off.

Package vpn imports 5 packages (graph). Updated 2018-11-06. Refresh now. Tools for package owners.