Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LiveReloadScript ¶
func LiveReloadScript() string
LiveReloadScript returns the JavaScript code for live reload
Types ¶
type LiveReload ¶
type LiveReload struct {
// contains filtered or unexported fields
}
LiveReload manages WebSocket connections for live reload functionality
func NewLiveReload ¶
func NewLiveReload() *LiveReload
NewLiveReload creates a new live reload manager
func (*LiveReload) Close ¶
func (lr *LiveReload) Close()
Close closes all connections and stops the broadcast loop
func (*LiveReload) ConnectionCount ¶
func (lr *LiveReload) ConnectionCount() int
ConnectionCount returns the number of active connections
func (*LiveReload) HandleWebSocket ¶
func (lr *LiveReload) HandleWebSocket(w http.ResponseWriter, r *http.Request)
HandleWebSocket handles WebSocket upgrade and connection
func (*LiveReload) NotifyReload ¶
func (lr *LiveReload) NotifyReload()
NotifyReload signals all connected clients to reload
func (*LiveReload) Start ¶
func (lr *LiveReload) Start(ctx context.Context)
Start begins the broadcast loop
type RenderFunc ¶
RenderFunc is a function that renders all pages for a site Users provide this to use their own components
Click to show internal directories.
Click to hide internal directories.