cfg

package
v0.0.0-...-a6e4c85 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath() (string, error)

GetPath returns path to config Shouldn't be necessary for basic use

func Migrate

func Migrate() (bool, error)

Migrate old config versions to current config version returns true if any changes were made to the config

Types

type Config

type Config struct {
	// Port used by daemon and rest of the components to communicate
	// Make sure to restart the daemon when you change it
	Port int

	// BindControlR causes CTRL+R to launch the search app
	BindControlR bool
	// LogLevel used to filter logs
	LogLevel zapcore.Level

	// Debug mode for search app
	Debug bool
	// SessionWatchPeriodSeconds is how often should daemon check if terminal
	// sessions are still alive
	// There is not much need to adjust the value because both memory overhead of watched sessions
	// and the CPU overhead of checking them are quite low
	SessionWatchPeriodSeconds uint
	// ReshHistoryMinSize is how large resh history needs to be for
	// daemon to ignore standard shell history files
	// Ignoring standard shell history gives us more consistent experience
	// but you can increase this to something large to see standard shell history in RESH search
	ReshHistoryMinSize int
}

Config returned by this package to be used in the rest of the project

func New

func New() (Config, error)

New returns a config file returned config is always usable, returned errors are informative

Jump to

Keyboard shortcuts

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