refresh

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorLogPath = func() string {
	return path.Join(LogLocation(), ID()+".err")
}
View Source
var LogLocation = func() string {
	dir, _ := homedir.Dir()
	dir, _ = homedir.Expand(dir)
	dir = path.Join(dir, ".refresh")
	os.MkdirAll(dir, 0755)
	return dir
}

Functions

func ID

func ID() string

func String

func String(s1, s2 string) string

Types

type Configuration

type Configuration struct {
	AppRoot            string        `yaml:"app_root"`
	IgnoredFolders     []string      `yaml:"ignored_folders"`
	IncludedExtensions []string      `yaml:"included_extensions"`
	BuildTargetPath    string        `yaml:"build_target_path"`
	BuildPath          string        `yaml:"build_path"`
	BuildDelay         time.Duration `yaml:"build_delay"`
	BinaryName         string        `yaml:"binary_name"`
	CommandFlags       []string      `yaml:"command_flags"`
	CommandEnv         []string      `yaml:"command_env"`
	EnableColors       bool          `yaml:"enable_colors"`
	LogName            string        `yaml:"log_name"`
}

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 Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(c *Configuration) *Logger

func (*Logger) Error

func (l *Logger) Error(msg interface{}, args ...interface{})

func (*Logger) Print

func (l *Logger) Print(msg interface{}, args ...interface{})

func (*Logger) Success

func (l *Logger) Success(msg interface{}, args ...interface{})

type Manager

type Manager struct {
	*Configuration
	Logger  *Logger
	Restart chan bool

	ID string
	// 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 (r *Manager) Start() error

type Watcher

type Watcher struct {
	*fsnotify.Watcher
	*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