conffile

package
v0.0.0-...-113f59a Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package conffile contains code to load, manipulate, and access config file settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path    string // disk path of HuJSON
	Raw     []byte // raw bytes from disk, in HuJSON form
	Std     []byte // standardized JSON form
	Version string // "alpha0" for now

	// Parsed is the parsed config, converted from its on-disk version to the
	// latest known format.
	//
	// As of 2023-10-15 there is exactly one format ("alpha0") so this is both
	// the on-disk format and the in-memory upgraded format.
	Parsed ipn.ConfigVAlpha
}

Config describes a config file.

func Load

func Load(path string) (*Config, error)

Load reads and parses the config file at the provided path on disk.

func (*Config) WantRunning

func (c *Config) WantRunning() bool

WantRunning reports whether c is non-nil and it's configured to be running.

Jump to

Keyboard shortcuts

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