Documentation
¶
Index ¶
- func ExampleManifestMerger()
- func FormatTimeout(ctx context.Context, d time.Duration) (string, error)
- func SanitizeString(s string) string
- func ValidatePath(path string, baseDir string) error
- func ValidatePort(port int) error
- type AuthConfig
- type Clock
- type ComparisonResult
- type Config
- type CumulativeSavings
- type FakeClock
- type Layer
- type LimitsConfig
- type LoggingConfig
- type MCPServerAnalysis
- type MCPServerConfig
- type ManifestMerger
- func (m *ManifestMerger) Merge(ctx context.Context, configs ...*Config) (*Config, error)
- func (m *ManifestMerger) MergeFiles(ctx context.Context, paths ...string) (*Config, error)
- func (m *ManifestMerger) MergeWithLayers(ctx context.Context, layers ...Layer) (*MergedConfig, error)
- func (m *ManifestMerger) Validate(cfg *Config) error
- type MergedConfig
- type Metadata
- type MonthlySaving
- type RealClock
- type ReportGenerator
- type SavingsResult
- type SavingsTracker
- type SecurityEvent
- type ServerConfig
- type ServerMetrics
- type ServerSavings
- type ServerTokenSavings
- type SessionMetrics
- type StatusDisplay
- func (sd *StatusDisplay) RenderCompact(status proxy.ServerStatus) string
- func (sd *StatusDisplay) RenderJSON(statusList proxy.ServerStatusList) (string, error)
- func (sd *StatusDisplay) RenderTable(statusList proxy.ServerStatusList) string
- func (sd *StatusDisplay) RenderVerbose(statusList proxy.ServerStatusList) string
- type TokenEstimator
- func (t *TokenEstimator) CalculateSavings(original, optimized string) (SavingsResult, error)
- func (t *TokenEstimator) CompareMCPConfigurations(servers map[string]MCPServerConfig) ComparisonResult
- func (t *TokenEstimator) EstimateLeanProxySchemaTokens() int
- func (t *TokenEstimator) EstimateNativeMCPOverhead(serverName string, toolCount int) int
- func (t *TokenEstimator) EstimateTokens(content string) int
- type TokenSavingsSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExampleManifestMerger ¶
func ExampleManifestMerger()
func SanitizeString ¶
func ValidatePath ¶ added in v0.6.0
func ValidatePort ¶
Types ¶
type AuthConfig ¶
type ComparisonResult ¶ added in v0.3.0
type ComparisonResult struct {
NativeMCPTokens int `json:"native_mcp_tokens"`
LeanProxyTokens int `json:"leanproxy_tokens"`
SavedTokens int `json:"saved_tokens"`
SavingsPercent float64 `json:"savings_percent"`
ServerBreakdown []MCPServerAnalysis `json:"server_breakdown"`
MonthlySavings map[string]MonthlySaving `json:"monthly_savings"`
}
type Config ¶
type Config struct {
Version string `json:"version" yaml:"version"`
Name string `json:"name" yaml:"name"`
Servers []ServerConfig `json:"servers" yaml:"servers"`
Auth *AuthConfig `json:"auth,omitempty" yaml:"auth,omitempty"`
Limits *LimitsConfig `json:"limits,omitempty" yaml:"limits,omitempty"`
Logging *LoggingConfig `json:"logging,omitempty" yaml:"logging,omitempty"`
Meta Metadata `json:"_meta,omitempty" yaml:"_meta,omitempty"`
}
type CumulativeSavings ¶ added in v0.2.0
type FakeClock ¶ added in v0.6.0
type FakeClock struct {
// contains filtered or unexported fields
}
func NewFakeClock ¶ added in v0.6.0
type LimitsConfig ¶
type LoggingConfig ¶
type MCPServerAnalysis ¶ added in v0.3.0
type MCPServerConfig ¶ added in v0.3.0
type ManifestMerger ¶
type ManifestMerger struct {
// contains filtered or unexported fields
}
func NewManifestMerger ¶
func NewManifestMerger(logger *slog.Logger) *ManifestMerger
func (*ManifestMerger) MergeFiles ¶
func (*ManifestMerger) MergeWithLayers ¶
func (m *ManifestMerger) MergeWithLayers(ctx context.Context, layers ...Layer) (*MergedConfig, error)
func (*ManifestMerger) Validate ¶
func (m *ManifestMerger) Validate(cfg *Config) error
type MergedConfig ¶
type MonthlySaving ¶ added in v0.3.0
type ReportGenerator ¶ added in v0.2.0
type ReportGenerator struct{}
func NewReportGenerator ¶ added in v0.2.0
func NewReportGenerator() *ReportGenerator
func (*ReportGenerator) GenerateJSONReport ¶ added in v0.2.0
func (rg *ReportGenerator) GenerateJSONReport(sessionData SessionMetrics) string
func (*ReportGenerator) GenerateMarkdownReport ¶ added in v0.2.0
func (rg *ReportGenerator) GenerateMarkdownReport(sessionData SessionMetrics) string
func (*ReportGenerator) NewEmptySessionMetrics ¶ added in v0.2.0
func (rg *ReportGenerator) NewEmptySessionMetrics() SessionMetrics
func (*ReportGenerator) NewSessionMetrics ¶ added in v0.2.0
func (rg *ReportGenerator) NewSessionMetrics() SessionMetrics
type SavingsResult ¶ added in v0.2.0
type SavingsTracker ¶ added in v0.2.0
type SavingsTracker struct {
// contains filtered or unexported fields
}
func NewSavingsTracker ¶ added in v0.2.0
func NewSavingsTracker() *SavingsTracker
func (*SavingsTracker) GetCumulativeSavings ¶ added in v0.2.0
func (s *SavingsTracker) GetCumulativeSavings() CumulativeSavings
func (*SavingsTracker) GetServerBreakdown ¶ added in v0.2.0
func (s *SavingsTracker) GetServerBreakdown() map[string]ServerSavings
func (*SavingsTracker) RecordRequest ¶ added in v0.2.0
func (s *SavingsTracker) RecordRequest(serverName string, original, optimized string) error
func (*SavingsTracker) Reset ¶ added in v0.2.0
func (s *SavingsTracker) Reset()
type SecurityEvent ¶ added in v0.2.0
type ServerConfig ¶
type ServerMetrics ¶ added in v0.2.0
type ServerSavings ¶ added in v0.2.0
type ServerTokenSavings ¶ added in v0.2.0
type SessionMetrics ¶ added in v0.2.0
type SessionMetrics struct {
SessionID string
SessionStart time.Time
SessionEnd time.Time
TotalRequests int
TokenSavings TokenSavingsSummary
SecurityEvents []SecurityEvent
ServerMetrics map[string]ServerMetrics
}
type StatusDisplay ¶ added in v0.2.0
type StatusDisplay struct {
// contains filtered or unexported fields
}
func NewStatusDisplay ¶ added in v0.2.0
func NewStatusDisplay() *StatusDisplay
func (*StatusDisplay) RenderCompact ¶ added in v0.2.0
func (sd *StatusDisplay) RenderCompact(status proxy.ServerStatus) string
func (*StatusDisplay) RenderJSON ¶ added in v0.2.0
func (sd *StatusDisplay) RenderJSON(statusList proxy.ServerStatusList) (string, error)
func (*StatusDisplay) RenderTable ¶ added in v0.2.0
func (sd *StatusDisplay) RenderTable(statusList proxy.ServerStatusList) string
func (*StatusDisplay) RenderVerbose ¶ added in v0.2.0
func (sd *StatusDisplay) RenderVerbose(statusList proxy.ServerStatusList) string
type TokenEstimator ¶ added in v0.2.0
type TokenEstimator struct{}
func NewTokenEstimator ¶ added in v0.2.0
func NewTokenEstimator() *TokenEstimator
func (*TokenEstimator) CalculateSavings ¶ added in v0.2.0
func (t *TokenEstimator) CalculateSavings(original, optimized string) (SavingsResult, error)
func (*TokenEstimator) CompareMCPConfigurations ¶ added in v0.3.0
func (t *TokenEstimator) CompareMCPConfigurations(servers map[string]MCPServerConfig) ComparisonResult
func (*TokenEstimator) EstimateLeanProxySchemaTokens ¶ added in v0.3.0
func (t *TokenEstimator) EstimateLeanProxySchemaTokens() int
func (*TokenEstimator) EstimateNativeMCPOverhead ¶ added in v0.3.0
func (t *TokenEstimator) EstimateNativeMCPOverhead(serverName string, toolCount int) int
func (*TokenEstimator) EstimateTokens ¶ added in v0.2.0
func (t *TokenEstimator) EstimateTokens(content string) int
type TokenSavingsSummary ¶ added in v0.2.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.