config

package
v0.0.0-...-9b2deca Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interface string   `yaml:"interface"`
	URLs      []string `yaml:"urls"`
}

Config stores the parsed configuration file

type Data

type Data struct {
	URLs []string
	IP   net.IP

	Changed bool
	// contains filtered or unexported fields
}

Data stores the desire state of the app

func NewWatcher

func NewWatcher(file string) (*Data, error)

NewWatcher builds new configuration file watcher

func (*Data) Sync

func (d *Data) Sync(out chan *Data)

Sync sends the desired state over the channel

Jump to

Keyboard shortcuts

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