internal

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseInterceptor

type ResponseInterceptor struct {
	Body       *bytes.Buffer
	StatusCode int
	Written    bool
	// contains filtered or unexported fields
}

func NewResponseInterceptor

func NewResponseInterceptor() *ResponseInterceptor

func (*ResponseInterceptor) Header

func (r *ResponseInterceptor) Header() http.Header

func (*ResponseInterceptor) Write

func (r *ResponseInterceptor) Write(data []byte) (int, error)

func (*ResponseInterceptor) WriteHeader

func (r *ResponseInterceptor) WriteHeader(statusCode int)

func (*ResponseInterceptor) WriteTo

func (r *ResponseInterceptor) WriteTo(w http.ResponseWriter)

type Session

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

func (*Session) AddConnection

func (s *Session) AddConnection(connID string, conn *websocket.Conn)

func (*Session) Close

func (s *Session) Close()

func (*Session) Notify

func (s *Session) Notify()

func (*Session) RemoveConnection

func (s *Session) RemoveConnection(connID string)

func (*Session) Stale

func (s *Session) Stale() bool

func (*Session) Watch added in v1.0.1

func (s *Session) Watch(path string)

func (*Session) Watching

func (s *Session) Watching(path string) bool

type SessionManager

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

func NewSessionManager

func NewSessionManager(debounce time.Duration) (*SessionManager, error)

func (*SessionManager) AddWatchPath

func (sm *SessionManager) AddWatchPath(sessionID, path string) error

func (*SessionManager) AddWebSocketToSession

func (sm *SessionManager) AddWebSocketToSession(sessionID string, connID string, conn *websocket.Conn)

func (*SessionManager) GetOrCreateSession

func (sm *SessionManager) GetOrCreateSession(sessionID string) *Session

func (*SessionManager) RemoveSession

func (sm *SessionManager) RemoveSession(sessionID string)

func (*SessionManager) RemoveWebSocketFromSession

func (sm *SessionManager) RemoveWebSocketFromSession(sessionID string, connID string)

func (*SessionManager) SessionExists

func (sm *SessionManager) SessionExists(sessionID string) bool

Jump to

Keyboard shortcuts

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