Documentation
¶
Index ¶
- type Config
- type ServerHandler
- func (h *ServerHandler) MainInputFileRelativePath() 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) SupportedExtensions() []string
- 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 {
AppRootDir string // e.g., /home/user/project (application root directory)
RootFolder string // e.g., web (relative to AppRootDir or absolute path)
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 func(message ...any) // 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) MainInputFileRelativePath ¶ added in v0.0.21
func (h *ServerHandler) MainInputFileRelativePath() string
MainInputFileRelativePath returns the path relative to AppRootDir (e.g., "pwa/main.server.go")
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) SupportedExtensions ¶ added in v0.0.22
func (h *ServerHandler) SupportedExtensions() []string
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.