memory

package
v0.0.0-...-aedb146 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessPoints      = make([]*AccessPoint, 0)
	AccessPointsMutex sync.Mutex
)
View Source
var (
	Clients      = make([]*Client, 0)
	ClientsMutex sync.Mutex
)

Functions

func GenerateID

func GenerateID() int

func StoreAccessPoint

func StoreAccessPoint(accessPoint *AccessPoint)

func StoreClient

func StoreClient(client *Client)

Types

type AccessPoint

type AccessPoint struct {
	ID       int      `json:"id"`
	SSID     string   `json:"ssid"`
	MACAddrs []string `json:"macAddrs"`
	Vendors  []string `json:"vendor"`
	RSSI     int8     `json:"rssi"`
	Channels []int    `json:"channels"`

	*sync.RWMutex `json:"-"`
}

func GetAccessPoints

func GetAccessPoints() []*AccessPoint

func (*AccessPoint) Update

func (ap *AccessPoint) Update(latest *AccessPoint)

type Client

type Client struct {
	ID     int    `json:"id"`
	MAC    string `json:"mac"`
	Vendor string `json:"vendor"`

	*sync.RWMutex `json:"-"`
}

func GetClients

func GetClients() []*Client

Jump to

Keyboard shortcuts

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