Documentation ¶
Index ¶
- Constants
- type BasicNetworkDevice
- func (d *BasicNetworkDevice) Connected() bool
- func (d *BasicNetworkDevice) FriendlyName() string
- func (d *BasicNetworkDevice) Generate() ([]i3.Output, error)
- func (d *BasicNetworkDevice) IP() net.IP
- func (d *BasicNetworkDevice) Interface() string
- func (d *BasicNetworkDevice) Speed() uint64
- func (d *BasicNetworkDevice) Update() error
- type Devicer
- type MultiDevice
- type NetworkDevice
- type WLANDevice
Constants ¶
View Source
const Identifier = "network"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicNetworkDevice ¶
type BasicNetworkDevice struct { // A friendly name to be used on the bar Name string // Name of the network interface for the corresponding device Identifier string // contains filtered or unexported fields }
A BaseBasicNetworkDevice describes a network device to be displayed on an i3bar TODO: Usage speed?
func (*BasicNetworkDevice) Connected ¶
func (d *BasicNetworkDevice) Connected() bool
func (*BasicNetworkDevice) FriendlyName ¶
func (d *BasicNetworkDevice) FriendlyName() string
func (*BasicNetworkDevice) Generate ¶
func (d *BasicNetworkDevice) Generate() ([]i3.Output, error)
Generate implements i3.Generator
func (*BasicNetworkDevice) IP ¶
func (d *BasicNetworkDevice) IP() net.IP
func (*BasicNetworkDevice) Interface ¶
func (d *BasicNetworkDevice) Interface() string
func (*BasicNetworkDevice) Speed ¶
func (d *BasicNetworkDevice) Speed() uint64
func (*BasicNetworkDevice) Update ¶
func (d *BasicNetworkDevice) Update() error
Update implements NetworkDevice
type Devicer ¶
Devicer is an interface used within this package to represent a configuration struct that is able to produce a Generator (representing one or more network devices)
type MultiDevice ¶
type MultiDevice struct { Devices map[string]NetworkDevice // Oredered list of keys describing preferred networks to show Preference []string }
MultiDevice is a Generator that manages a set of networks, and shows the most preferred network that is conneced
type NetworkDevice ¶
type WLANDevice ¶
type WLANDevice struct { BasicNetworkDevice WarnThreshold int CritThreshold int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.