server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupDeviceFetcher

func SetupDeviceFetcher(
	writeDevices chan WriteDevicesOp,
	ts *tsapi.TSApi,
	duration time.Duration,
)

Fetch the devices on a regular basis

func SetupDnsServer

func SetupDnsServer(tsServer *tsnet.Server, readDevices chan ReadDevicesOp, host string)

Run the DNS server

func Start

func Start()

Types

type DeviceMap

type DeviceMap map[string]tsapi.Device

type DnsHandler

type DnsHandler func(dns.ResponseWriter, *dns.Msg)

type ReadDevicesOp

type ReadDevicesOp struct {
	Response chan DeviceMap
}

type WriteDevicesOp

type WriteDevicesOp struct {
	DeviceMap DeviceMap
	Response  chan bool
}

Jump to

Keyboard shortcuts

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