config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigDirName = "go_dev_monitor"

Variables

This section is empty.

Functions

func GetDefaultConfigDir

func GetDefaultConfigDir() (string, error)

func SetConfigDir

func SetConfigDir(configDir string)

SetConfigDir for tests

Types

type Agent

type Agent struct {
	Roots         []string `yaml:"roots"`
	MaxFolderDept int      `yaml:"max_folder_dept"`
	ServerAddress string   `yaml:"server_address"`
	Hostname      string   `yaml:"hostname"`
}

func NewAgentConfig

func NewAgentConfig() *Agent

func (*Agent) AddRoot

func (c *Agent) AddRoot(root string) error

func (*Agent) RemoveRoot

func (c *Agent) RemoveRoot(root string) error

func (*Agent) Reset

func (c *Agent) Reset() *Agent

func (*Agent) SetServer

func (c *Agent) SetServer(server string) error

type Config

type Config struct {
	Agent  *Agent  `yaml:"agent,omitempty"`
	Server *Server `yaml:"server,omitempty"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

func (*Config) GetConfigDir

func (cfg *Config) GetConfigDir() string

func (*Config) Save

func (cfg *Config) Save() error

type Server

type Server struct {
	Port        int    `yaml:"port"`
	QueueSize   int    `yaml:"queue_size"`
	StoreFolder string `yaml:"store_folder"`
}

func (*Server) Reset

func (c *Server) Reset() *Server

Jump to

Keyboard shortcuts

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