watcher

package
v0.0.0-...-86551ff Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ACT_INIT is the flag to start the service
	ACT_INIT = "init"
	//ACT_STOP is the flag to stop the service
	ACT_STOP = "stop"
	//ACT_RESET is the flag to reset the service
	ACT_RESET = "reset"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language struct {
	ExecName      string
	ExecCmd       string
	ProcessRegexp string
	ExecPath      string
}

Language is a structure responsible for the control language information such as Name, CommandPath, process expression and other details used for the control processes.

func GetLanguage

func GetLanguage(language string) (*Language, error)

GetLanguage is a simple selector using supportedLanguages

type Watcher

type Watcher struct {
	RootPath       string
	Extensions     []string
	Files          []string
	IsOpen         *bool
	Language       string
	AppPath        string
	DoneChan       chan bool
	SysOS          string
	DispatcherChan chan string
	// contains filtered or unexported fields
}

Watcher as well as Configuration File is the central configuration of the project, used to control the entire anko flow.

func New

func New(args Watcher) *Watcher

New is a simple Watcher initializer

func (*Watcher) AppController

func (wc *Watcher) AppController()

AppController is the main channel used for control anko actions like reset, start and other future options

func (*Watcher) InitApp

func (wc *Watcher) InitApp()

InitApp is responsible for initializing the configured application using anko.yaml to configure the primary language and processes.

func (*Watcher) WatchForChange

func (wc *Watcher) WatchForChange()

WatchForChange is a simple fsnotify wrapper used to watch all root patch events.

Jump to

Keyboard shortcuts

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