server

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 12 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,
)

Fetch the devices on a regular basis

func SetupDnsServer

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

Run the DNS server

func SetupHttpServer added in v0.6.0

func SetupHttpServer(
	tsServer *tsnet.Server,
	ts *tsapi.TSApi,
	readDevices chan ReadDevicesOp,
	writeDevices chan WriteDevicesOp,
)

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