hotreload

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine(index *Index) *Engine

func (*Engine) Handle

func (e *Engine) Handle(event watcher.Event) (int, error)

func (*Engine) Register

func (e *Engine) Register(kind ReloadKind, handler Handler)

type FileDependents

type FileDependents struct {
	FileAbsPath string
	Entries     []ReloadEntry
}

type Handler

type Handler func(entry ReloadEntry, event watcher.Event) error

type Index

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

func NewIndex

func NewIndex() *Index

func (*Index) Dependents

func (idx *Index) Dependents(filePath string) (FileDependents, bool)

func (*Index) RegisterClientBundle

func (idx *Index) RegisterClientBundle(bundle goxcompiler.CompileClientBundle)

func (*Index) RegisterClientBundles

func (idx *Index) RegisterClientBundles(bundles []goxcompiler.CompileClientBundle)

func (*Index) RegisterCompileResult

func (idx *Index) RegisterCompileResult(kind ReloadKind, result *goxcompiler.CompileResult)

func (*Index) RemoveEntry

func (idx *Index) RemoveEntry(entryAbsPath string)

type ReloadEntry

type ReloadEntry struct {
	Kind         ReloadKind
	EntryPath    string
	EntryAbsPath string
	OutPath      string
	OutAbsPath   string
}

type ReloadKind

type ReloadKind string
const (
	ReloadConfig ReloadKind = "config"
	ReloadPage   ReloadKind = "page"
	ReloadError  ReloadKind = "error"
	ReloadClient ReloadKind = "client"
)

Jump to

Keyboard shortcuts

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