config

package
v0.0.0-...-e2aaeb7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(c *Config)

should only be called by the bootstrap

Types

type Config

type Config struct {
	ConfigDir         string    // passed in from CLI
	ConfigFile        string    // server.json
	HTTPAddress       string    // net.Dial address format, :port is good enough
	Name              string    // what this bridge shows as
	ID                string    // displayed serial number -- if you run multiple instances, make sure each has a distinct ID
	HCConfig          hc.Config // base HomeControl configuration
	Discover          bool      // run Kasa, Konnected, & Shelly auto-discovery (does not work properly yet, do not enable)
	KasaPullRate      uint16    // (seconds) how frequently to pull Kasa devices -- 0 to disable
	KasaBroadcasts    uint8     // number of UDP broadcast packets to send - 1 is usually enough -- (unset/0/1 sends 1 packet)
	KasaTimeout       uint8     // how long to wait for direct (TCP) pulls
	KonnectedTimeout  uint8     /// how long to wait for direct pulls
	KonnectedPullRate uint16    /// how frequently to pull , 0 to disable
}

Config is the global daemon configuration...

func Get

func Get() *Config

Get a pointer to the global config

Jump to

Keyboard shortcuts

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