config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidLogSeverity

func IsValidLogSeverity(severity LogSeverity) bool

func OverrideWithLoggingFlags

func OverrideWithLoggingFlags(mountConfig *MountConfig, logFile string, logFormat string,
	debugFuse bool, debugGCS bool, debugMutex bool)

OverrideWithLoggingFlags overwrites the configs with the flag values if the config values are empty.

Types

type LogConfig

type LogConfig struct {
	Severity LogSeverity `yaml:"severity"`
	Format   string      `yaml:"format"`
	FilePath string      `yaml:"file-path"`
}

type LogSeverity

type LogSeverity string
const (
	TRACE   LogSeverity = "TRACE"
	DEBUG   LogSeverity = "DEBUG"
	INFO    LogSeverity = "INFO"
	WARNING LogSeverity = "WARNING"
	ERROR   LogSeverity = "ERROR"
	OFF     LogSeverity = "OFF"
)

type MountConfig

type MountConfig struct {
	WriteConfig `yaml:"write"`
	LogConfig   `yaml:"logging"`
}

func NewMountConfig

func NewMountConfig() *MountConfig

func ParseConfigFile

func ParseConfigFile(fileName string) (mountConfig *MountConfig, err error)

type WriteConfig

type WriteConfig struct {
	CreateEmptyFile bool `yaml:"create-empty-file"`
}

Jump to

Keyboard shortcuts

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