Index | Files

package netinfo

import ""

Package netinfo provides an i3bar module for network information.


Package Files


type Module Uses

type Module struct {
    // contains filtered or unexported fields

Module represents a netinfo bar module.

func Interface Uses

func Interface(iface string) *Module

Interface constructs an instance of the netinfo module restricted to the specified interface.

func New Uses

func New() *Module

New constructs a netinfo module that scans all interfaces.

func Prefix Uses

func Prefix(prefix string) *Module

Prefix constructs an instance of the netinfo module restricted to interfaces with the given prefix.

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 struct {

State represents the network state.

func (State) Connected Uses

func (s State) Connected() bool

Connected returns true if connected to a network.

func (State) Connecting Uses

func (s State) Connecting() bool

Connecting returns true if a connection is in progress.

func (State) Enabled Uses

func (s State) Enabled() bool

Enabled returns true if a network interface is enabled.

Package netinfo imports 5 packages (graph) and is imported by 2 packages. Updated 2018-11-12. Refresh now. Tools for package owners.