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 { OnlineUsers storage.OnlineUsers Devices storage.Devices 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.
Click to show internal directories.
Click to hide internal directories.