config

package
v0.75.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRefreshRate represents the refresh interval.
	DefaultRefreshRate = 1 // secs

	// DefaultLogLevel represents the default log level.
	DefaultLogLevel = "info"

	// DefaultPortNum represents the default port number.
	DefaultPortNum = 8080

	// DefaultAddress represents the default address.
	DefaultAddress = "localhost"

	// DefaultLogLength represents the default log length.
	DefaultLogLength = 1000

	// DefaultSortColumn represents the default sort column.
	DefaultSortColumn = "NAME"
)
View Source
const (
	PortEnvVarName   = "PC_PORT_NUM"
	TuiEnvVarName    = "PC_DISABLE_TUI"
	ConfigEnvVarName = "PC_CONFIG_FILES"
)
View Source
const (
	LogPathEnvVarName = "PC_LOG_FILE"
	LogFileFlags      = os.O_CREATE | os.O_APPEND | os.O_WRONLY | os.O_TRUNC
	LogFileMode       = os.FileMode(0600)
)

Variables

View Source
var (
	Version         = "undefined"
	Commit          = "undefined"
	Date            = "undefined"
	CheckForUpdates = "false"
	License         = "Apache-2.0"
)

Functions

func GetConfigDefault added in v0.65.0

func GetConfigDefault() []string

func GetLogFilePath added in v0.43.1

func GetLogFilePath() string

func GetShortCutsPath added in v0.29.4

func GetShortCutsPath() string

func GetTuiDefault added in v0.65.0

func GetTuiDefault() bool

Types

type Flags added in v0.65.0

type Flags struct {
	RefreshRate    *int
	PortNum        *int
	Address        *string
	LogLevel       *string
	LogFile        *string
	LogLength      *int
	LogFollow      *bool
	LogTailLength  *int
	Headless       *bool
	Command        *string
	Write          *bool
	NoDependencies *bool
	HideDisabled   *bool
	SortColumn     *string
	IsReverseSort  *bool
}

Flags represents PC configuration flags.

func NewFlags added in v0.65.0

func NewFlags() *Flags

NewFlags returns new configuration flags.

Jump to

Keyboard shortcuts

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