Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevDashboard ¶
type DevDashboard struct {
// contains filtered or unexported fields
}
DevDashboard provides an interactive web interface for development
func NewDevDashboard ¶
func NewDevDashboard(server *DevServer, port int) *DevDashboard
NewDevDashboard creates a new development dashboard
type DevServer ¶
type DevServer struct {
// contains filtered or unexported fields
}
DevServer provides development server with hot reload and debugging
func NewDevServer ¶
func NewDevServer(app *lift.App, config *DevServerConfig) *DevServer
NewDevServer creates a new development server
func (*DevServer) GetStats ¶
func (s *DevServer) GetStats() SafeDevStats
GetStats returns current development server statistics
type DevServerConfig ¶
type DevServerConfig struct {
Port int `json:"port"`
HotReload bool `json:"hot_reload"`
DebugMode bool `json:"debug_mode"`
ProfilerPort int `json:"profiler_port"`
DashboardPort int `json:"dashboard_port"`
WatchPaths []string `json:"watch_paths"`
WatchInterval time.Duration `json:"watch_interval"`
BuildCommand string `json:"build_command"`
RestartDelay time.Duration `json:"restart_delay"`
EnableCORS bool `json:"enable_cors"`
LogLevel string `json:"log_level"`
}
DevServerConfig configures the development server
func DefaultDevServerConfig ¶
func DefaultDevServerConfig() *DevServerConfig
DefaultDevServerConfig returns sensible defaults for development
type DevStats ¶
type DevStats struct {
Requests int64 `json:"requests"`
Errors int64 `json:"errors"`
Restarts int64 `json:"restarts"`
LastRestart time.Time `json:"last_restart"`
AverageLatency time.Duration `json:"average_latency"`
Uptime time.Duration `json:"uptime"`
HotReloads int64 `json:"hot_reloads"`
BuildTime time.Duration `json:"build_time"`
// contains filtered or unexported fields
}
DevStats holds internal development server statistics (with mutex)
type FileEvent ¶
type FileEvent struct {
Path string `json:"path"`
Type string `json:"type"`
Timestamp time.Time `json:"timestamp"`
}
FileEvent represents a file change event
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
FileWatcher monitors file changes
func NewFileWatcher ¶
func NewFileWatcher(paths []string, interval time.Duration) *FileWatcher
NewFileWatcher creates a new file watcher
func (*FileWatcher) Events ¶
func (w *FileWatcher) Events() <-chan FileEvent
Events returns the events channel
type LogEntry ¶ added in v1.0.37
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Level string `json:"level"`
Message string `json:"message"`
Fields map[string]interface{} `json:"fields,omitempty"`
}
LogEntry represents a single log entry
type LogService ¶ added in v1.0.37
type LogService struct {
// contains filtered or unexported fields
}
LogService manages log collection and retrieval
func LogServiceFactory ¶ added in v1.0.37
func LogServiceFactory(logFile string, ff *features.FeatureFlags) *LogService
LogServiceFactory creates the appropriate log service based on environment
func NewLogService ¶ added in v1.0.37
func NewLogService(logFile string, ff *features.FeatureFlags) *LogService
NewLogService creates a new log service
func (*LogService) AddLog ¶ added in v1.0.37
func (ls *LogService) AddLog(entry LogEntry)
AddLog adds a log entry
func (*LogService) GetLogsSince ¶ added in v1.0.37
func (ls *LogService) GetLogsSince(since time.Time) []LogEntry
GetLogsSince returns logs since a given timestamp
func (*LogService) GetRecentLogs ¶ added in v1.0.37
func (ls *LogService) GetRecentLogs(limit int) []LogEntry
GetRecentLogs returns the most recent log entries
func (*LogService) SearchLogs ¶ added in v1.0.37
func (ls *LogService) SearchLogs(query string) []LogEntry
SearchLogs searches for logs containing a query string
type MockLogService ¶ added in v1.0.37
type MockLogService struct {
*LogService
// contains filtered or unexported fields
}
MockLogService provides mock logs for development
func NewMockLogService ¶ added in v1.0.37
func NewMockLogService(ff *features.FeatureFlags) *MockLogService
NewMockLogService creates a mock log service for development
type ProfilerServer ¶
type ProfilerServer struct {
// contains filtered or unexported fields
}
ProfilerServer provides pprof endpoints for performance profiling
func NewProfilerServer ¶
func NewProfilerServer(port int) *ProfilerServer
NewProfilerServer creates a new profiler server
func (*ProfilerServer) Start ¶
func (p *ProfilerServer) Start() error
Start starts the profiler server
type SafeDevStats ¶
type SafeDevStats struct {
Requests int64 `json:"requests"`
Errors int64 `json:"errors"`
Restarts int64 `json:"restarts"`
LastRestart time.Time `json:"last_restart"`
AverageLatency time.Duration `json:"average_latency"`
Uptime time.Duration `json:"uptime"`
HotReloads int64 `json:"hot_reloads"`
BuildTime time.Duration `json:"build_time"`
}
SafeDevStats holds development server statistics without mutex (safe for copying)