reload

package
v0.0.0-...-89dfdfc Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigNotExist = errors.New("no config file was found")

ErrConfigNotExist is returned when a configuration file cannot be found.

Functions

func ID

func ID() string

func Init

func Init()

func Run

func Run(cfgFile string) error

func RunBackground

func RunBackground(config *Configuration) error

func RunWithContext

func RunWithContext(cfgFile string, ctx context.Context) error

Types

type Configuration

type Configuration struct {
	AppRoot            string        `yaml:"app_root"`
	BinaryName         string        `yaml:"binary_name"`
	BuildDelay         time.Duration `yaml:"build_delay"`
	BuildFlags         []string      `yaml:"build_flags"`
	BuildPath          string        `yaml:"build_path"`
	BuildTargetPath    string        `yaml:"build_target_path"`
	Command            string        `yaml:"command"`
	CommandEnv         []string      `yaml:"command_env"`
	CommandFlags       []string      `yaml:"command_flags"`
	EnableColors       bool          `yaml:"enable_colors"`
	ForcePolling       bool          `yaml:"force_polling,omitempty"`
	IgnoredFolders     []string      `yaml:"ignored_folders"`
	IncludedExtensions []string      `yaml:"included_extensions"`
	LogName            string        `yaml:"log_name"`
	Debug              bool          `yaml:"-"`
	Path               string        `yaml:"-"`
	Stderr             io.Writer     `yaml:"-"`
	Stdin              io.Reader     `yaml:"-"`
	Stdout             io.Writer     `yaml:"-"`
}

func (*Configuration) Dump

func (c *Configuration) Dump(path string) error

func (*Configuration) FullBuildPath

func (c *Configuration) FullBuildPath() string

func (*Configuration) Load

func (c *Configuration) Load(path string) error

type Manager

type Manager struct {
	*Configuration
	ID      string
	Logger  *logging.Logger
	Restart chan bool
	// contains filtered or unexported fields
}

func New

func New(c *Configuration) *Manager

func NewWithContext

func NewWithContext(c *Configuration, ctx context.Context) *Manager

func (*Manager) Start

func (m *Manager) Start() error

type Watcher

type Watcher struct {
	filenotify.FileWatcher
	*Manager
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(r *Manager) *Watcher

func (*Watcher) Start

func (w *Watcher) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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