status

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

type Daemon func()

Daemon is a background function

func NewDaemon

func NewDaemon(ctx context.Context, args DaemonArgs) (chan<- []net.HardwareAddr, Daemon)

NewDeamon returns channel for communicating with daemon and daemon to be run in the background in the separate gourtine .

type DaemonArgs added in v0.3.3

type DaemonArgs struct {
	Iter storage.StatusIterator

	Counters storage.StatusTx

	// RefreshTime is duration, that every time when passes, users
	// get their online status updated.
	RefreshTime time.Duration

	// SingleAddrTTL represents time to live for single
	// mac address. After this period of time user with
	// given mac address will be marked as offline
	// during next status update.
	SingleAddrTTL time.Duration
}

DaemonArgs contains list of arguments for NewDeamon constructor.

Jump to

Keyboard shortcuts

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