config

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BTFConfig

type BTFConfig struct {
	CacheDir      string
	AllowDownload bool
	HubMirror     string
}

BTFConfig controls CO-RE relocations and BTFHub downloads

func (BTFConfig) Validate

func (c BTFConfig) Validate() error

Validate ensures BTF config is usable for CO-RE relocations

type DiffConfig

type DiffConfig struct {
	// Library specifies the diff algorithm to use ("bsdiff" or "xdelta")
	Library string

	// ChunkSizeMB is the chunk size in megabytes for large file processing
	ChunkSizeMB int

	// HashAlgo specifies the hash algorithm for CAS ("sha256" or "blake3")
	HashAlgo string

	// DedupScope defines deduplication scope ("container" or "cluster")
	DedupScope string

	// EnableDiff enables binary diff mode (vs legacy full-file compression)
	EnableDiff bool

	// SnapshotInterval defines how often to create full snapshots (version count)
	SnapshotInterval int

	// ChunkThresholdBytes is the file size threshold for chunking
	ChunkThresholdBytes int64

	// EBPF holds configuration for kernel-level monitoring, profiler, and lifecycle tracing
	EBPF EBPFConfig
}

DiffConfig holds configuration for binary diff operations

func DefaultConfig

func DefaultConfig() *DiffConfig

DefaultConfig returns the default configuration

func LoadFromEnv

func LoadFromEnv() *DiffConfig

LoadFromEnv loads configuration from environment variables

func (*DiffConfig) GetChunkSizeBytes

func (c *DiffConfig) GetChunkSizeBytes() int

GetChunkSizeBytes returns chunk size in bytes

func (*DiffConfig) ShouldChunk

func (c *DiffConfig) ShouldChunk(fileSize int64) bool

ShouldChunk returns true if a file of the given size should be chunked

func (*DiffConfig) Validate

func (c *DiffConfig) Validate() error

Validate checks if the configuration is valid

type EBPFConfig

type EBPFConfig struct {
	Enable           bool
	ProgramPath      string
	ProfilerInterval time.Duration
	ProfilerAlpha    float64
	HotPathThreshold float64
	EnableProfiler   bool
	AutoInject       bool
	InjectorCommand  string
	LifecycleTracing bool
	FallbackFSNotify bool
	CollectLifecycle bool
	EventBufferSize  int
	LifecycleBufSize int
	BTF              BTFConfig
}

EBPFConfig captures settings for eBPF-based monitoring and adaptive profiling

func (EBPFConfig) Validate

func (c EBPFConfig) Validate() error

Validate ensures eBPF configuration values make sense for the running kernel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL