wifi

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 15 Imported by: 0

README

Connected Wi-Fi signal

Reports connected station interfaces only (no scans). info.wf holds the current snapshot keyed by interface (s SSID, r RSSI in dBm when available); stats.wf stores available RSSI as integer dBm. Collected on the default interval only; real-time requests reuse the last snapshot. Set SKIP_WIFI=true on the agent to disable collection.

  • Linux: nl80211 via github.com/mdlayher/wifi. Docker needs network_mode: host. Skipped when /sys/class/ieee80211 lists no wireless devices.
  • macOS: CoreWLAN via osascript (JXA). SSID may be redacted by privacy settings.
  • Windows: native WLAN API, keyed by adapter alias (e.g. Wi-Fi), falling back to interface GUID.
  • Other platforms: unsupported.

Documentation

Overview

Package wifi collects only currently associated station interfaces. Collection failures are empty snapshots, never cached connected state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect() map[string]system.WiFi

Collect uses a single deadline across interface queries where supported. Unsupported platforms and denied association access produce no readings; later polls retry. SKIP_WIFI=true disables collection entirely.

func Signals

func Signals(snapshot map[string]system.WiFi) map[string]int8

Signals reduces a snapshot to the RSSI values stored in stats history. Interfaces without an available reading are omitted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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