hotreload

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleKeyList added in v0.7.0

type BundleKeyList []string

func (BundleKeyList) Diff added in v0.7.0

func (l BundleKeyList) Diff(bundleList BundleKeyList) BundleKeyList

type HotReload

type HotReload struct {
	Redirected chan RedirectionEvent
	// contains filtered or unexported fields
}

func New

func New() *HotReload

func (*HotReload) CurrentBundleKeys added in v0.7.0

func (s *HotReload) CurrentBundleKeys() []string

func (*HotReload) EmitLog added in v0.21.0

func (s *HotReload) EmitLog(level LogLevel, message string) error

EmitLog emits a log to the current hot reload socket if one is available

func (*HotReload) HandleWebSocket

func (s *HotReload) HandleWebSocket(w http.ResponseWriter, r *http.Request)

func (*HotReload) IsActive added in v0.7.0

func (s *HotReload) IsActive() bool

func (*HotReload) IsActiveBundle added in v0.7.0

func (s *HotReload) IsActiveBundle(key string) bool

IsActiveBundle determines if a bundle is currently active in the web browser

func (*HotReload) ReloadSignal

func (s *HotReload) ReloadSignal() error

type HotReloader added in v0.3.2

type HotReloader interface {
	ReloadSignal() error
	HandleWebSocket(w http.ResponseWriter, r *http.Request)
	CurrentBundleKeys() []string
	IsActive() bool
	IsActiveBundle(string) bool
}

type LogLevel added in v0.21.0

type LogLevel int32
const (
	Info LogLevel = iota
	Warning
	Error
)

type RedirectionEvent added in v0.7.0

type RedirectionEvent struct {
	PreviousBundleKeys BundleKeyList
	BundleKeys         BundleKeyList
}

type SocketRequest

type SocketRequest struct {
	Operation string   `json:"operation"`
	Value     []string `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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