configuration

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package configuration provides loading facilities for Mutagen's global configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// Ignore contains parameters related to synchronization ignore
	// specifications.
	Ignore struct {
		Default []string           `toml:"default"`
		VCS     sync.IgnoreVCSMode `toml:"vcs"`
	} `toml:"ignore"`

	// Symlink contains parameters related to symlink handling.
	Symlink struct {
		// Mode specifies the default symlink mode.
		Mode sync.SymlinkMode `toml:"mode"`
	} `toml:"symlink"`

	// Watch contains parameters related to filesystem monitoring.
	Watch struct {
		// Mode specifies the default watch mode.
		Mode filesystem.WatchMode `toml:"mode"`

		// PollingInterval specifies the interval (in seconds) for poll-based
		// file monitoring. A value of 0 specifies that the default interval
		// should be used.
		PollingInterval uint32 `toml:"pollingInterval"`
	} `toml:"watch"`
}

Configuration represents the global Mutagen configuration.

func Load

func Load() (*Configuration, error)

Load loads the Mutagen configuration file from disk and populates a Configuration structure. If the Mutagen configuration file does not exist, this method will return a structure with the default configuration values. The returned structure is not re-used, so its members can be freely mutated.

Jump to

Keyboard shortcuts

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