Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasLetheCapabilities ¶
func HasLetheCapabilities() bool
HasLetheCapabilities checks if any Lethe providers are registered
func IsLetheWriter ¶
func IsLetheWriter(writer interface{}) bool
IsLetheWriter checks if a writer implements Lethe optimizations
func RegisterCapability ¶
func RegisterCapability(provider CapabilityProvider)
RegisterCapability allows Lethe to register its capabilities at runtime This is called by Lethe's init() function when both packages are imported
Types ¶
type CapabilityProvider ¶
type CapabilityProvider struct {
Name string
CreateOptimizedSink func(string, ...interface{}) (interface{}, error)
DetectWriter func(interface{}) bool
}
CapabilityProvider defines functions that can be registered by Lethe
func GetLetheProvider ¶
func GetLetheProvider() (CapabilityProvider, bool)
GetLetheProvider returns the Lethe provider if available
func GetRegisteredCapabilities ¶
func GetRegisteredCapabilities() []CapabilityProvider
GetRegisteredCapabilities returns all registered Lethe capabilities
type LetheWriter ¶
type LetheWriter interface {
// Standard WriteSyncer methods
Write([]byte) (int, error)
Sync() error
Close() error
// Lethe-specific optimization methods
WriteOwned([]byte) (int, error) // Zero-copy write for owned buffers
GetOptimalBufferSize() int // Auto-tuning hint
SupportsHotReload() bool // Configuration hot-reload capability
}
LetheWriter defines the enhanced interface that Lethe writers implement When Iris detects this interface, it automatically enables optimizations
func DetectLetheCapabilities ¶
func DetectLetheCapabilities(writer interface{}) LetheWriter
DetectLetheCapabilities checks if a writer supports Lethe optimizations Returns the enhanced interface if available, nil otherwise