Versions in this module Expand all Collapse all v0 v0.1.2 Apr 10, 2026 Changes in this version + const DefaultMaxBytes + const DefaultSemanticMaxEntries + func BuildKey(sourceScope, dest, profile, namespace, subject, q string, limit, offset int, ...) [32]byte + func SemanticScopeKey(sourceName, dest, profile, namespace string) [32]byte + type CacheEntry struct + HasMore bool + NextCursor string + Records []destination.TranslatedPayload + Watermark uint64 + type ExactCache struct + func NewExactCache(maxBytes int64, stats *Stats) *ExactCache + func (c *ExactCache) BytesUsed() int64 + func (c *ExactCache) Evictions() int64 + func (c *ExactCache) Get(key [32]byte, dest string) (CacheEntry, bool) + func (c *ExactCache) InvalidateDest(dest string) + func (c *ExactCache) Len() int + func (c *ExactCache) Put(key [32]byte, dest string, entry CacheEntry) + type LRU struct + func NewLRU[K comparable, V any](maxBytes int64) *LRU[K, V] + func (l *LRU[K, V]) Add(key K, value V, bytes int64) + func (l *LRU[K, V]) BytesUsed() int64 + func (l *LRU[K, V]) Evictions() int64 + func (l *LRU[K, V]) Get(key K) (V, bool) + func (l *LRU[K, V]) Len() int + func (l *LRU[K, V]) Remove(key K) + type SemanticCache struct + func NewSemanticCache(maxEntries int, stats *SemanticStats) *SemanticCache + func (sc *SemanticCache) Get(scope [32]byte, queryVec []float32, dest string, threshold float64) (SemanticCacheEntry, bool) + func (sc *SemanticCache) InvalidateDest(dest string) + func (sc *SemanticCache) Len() int + func (sc *SemanticCache) Put(scope [32]byte, queryVec []float32, dest string, entry SemanticCacheEntry) + type SemanticCacheEntry struct + HasMore bool + NextCursor string + Records []destination.TranslatedPayload + type SemanticStats struct + func NewSemanticStats(reg prometheus.Registerer) *SemanticStats + func (s *SemanticStats) Hit() + func (s *SemanticStats) HitCount() int64 + func (s *SemanticStats) Miss() + func (s *SemanticStats) MissCount() int64 + type Stats struct + func NewStats(reg prometheus.Registerer) *Stats + func (s *Stats) Hit() + func (s *Stats) HitCount() int64 + func (s *Stats) Miss() + func (s *Stats) MissCount() int64 + type WatermarkStore struct + func NewWatermarkStore() *WatermarkStore + func (w *WatermarkStore) Advance(dest string) uint64 + func (w *WatermarkStore) Current(dest string) uint64