Documentation
¶
Index ¶
- type Config
- type ServerHandler
- func (h *ServerHandler) MainFilePath() string
- func (h *ServerHandler) Name() string
- func (h *ServerHandler) NewFileEvent(fileName, extension, filePath, event string) error
- func (h *ServerHandler) RestartServer() error
- func (h *ServerHandler) StartServer(wg *sync.WaitGroup)
- func (h *ServerHandler) UnobservedFiles() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.0.4
type Config struct {
RootFolder string // e.g., web
MainFileWithoutExtension string // e.g., main.server
ArgumentsForCompilingServer func() []string // e.g., []string{"-X 'main.version=v1.0.0'"}
ArgumentsToRunServer func() []string // e.g., []string{"dev"}
PublicFolder string // e.g., public
AppPort string // e.g., 8080
Logger io.Writer // For logging output
ExitChan chan bool // Global channel to signal shutdown
}
type ServerHandler ¶
type ServerHandler struct {
*Config
// contains filtered or unexported fields
}
func New ¶ added in v0.0.4
func New(c *Config) *ServerHandler
func (*ServerHandler) MainFilePath ¶
func (h *ServerHandler) MainFilePath() string
MainFilePath eg: <root>/web/main.server.go
func (*ServerHandler) Name ¶
func (h *ServerHandler) Name() string
func (*ServerHandler) NewFileEvent ¶
func (h *ServerHandler) NewFileEvent(fileName, extension, filePath, event string) error
event: create,write,remove,rename
func (*ServerHandler) RestartServer ¶
func (h *ServerHandler) RestartServer() error
func (*ServerHandler) StartServer ¶ added in v0.0.6
func (h *ServerHandler) StartServer(wg *sync.WaitGroup)
Start inicia el servidor como goroutine
func (*ServerHandler) UnobservedFiles ¶
func (h *ServerHandler) UnobservedFiles() []string
UnobservedFiles returns the list of files that should not be tracked by file watchers eg: main.exe, main_temp.exe
Click to show internal directories.
Click to hide internal directories.