Versions in this module Expand all Collapse all v1 v1.5.0 Apr 2, 2026 v0 v0.1.0 Apr 6, 2026 Changes in this version + type AnalyzeResponse struct + ContentType string + type CompressRequest struct + Budget int + Input string + Mode string + type CompressResponse struct + FinalTokens int + OriginalTokens int + Output string + ProcessingTimeMs int64 + ReductionPercent float64 + TokensSaved int + type Config struct + APIKey string + LogLevel string + PipelineConfig filter.PipelineConfig + Port int + RateLimit int + Version string + type HealthResponse struct + Status string + Version string + type LogEntry struct + Fields map[string]any + Level string + Message string + Time string + type Logger struct + func NewLogger(level string) *Logger + func (l *Logger) Debug(msg string, fields map[string]any) + func (l *Logger) Error(msg string, fields map[string]any) + func (l *Logger) Info(msg string, fields map[string]any) + type Metrics struct + ActiveConnections int64 + ContentTypeCounts map[string]int64 + ProcessingTimes []time.Duration + ReductionPercents []float64 + StartTime time.Time + TotalCompressions int64 + TotalErrors int64 + TotalRequests int64 + TotalTokensIn int64 + TotalTokensOut int64 + TotalTokensSaved int64 + func NewMetrics() *Metrics + func (m *Metrics) PrometheusFormat() string + func (m *Metrics) RecordCompression(original, final int, duration time.Duration, contentType string) + func (m *Metrics) RecordError() + func (m *Metrics) Snapshot() MetricsSnapshot + type MetricsSnapshot struct + AvgProcessingMs int64 + AvgReductionPct float64 + ContentTypeCounts map[string]int64 + TotalCompressions int64 + TotalErrors int64 + TotalRequests int64 + TotalTokensIn int64 + TotalTokensOut int64 + TotalTokensSaved int64 + Uptime time.Duration + type Server struct + func New(config Config) *Server + func (s *Server) Start() error + func (s *Server) StartContext(ctx context.Context) error + type StatsResponse struct + LayerCount int + Version string