Documentation
¶
Overview ¶
Package probe provides kernel capability detection for the io_uring engine.
At engine startup, Probe (or ProbeWith for testing) discovers which kernel features are available — multishot accept/recv, provided buffer rings, fixed-file tables, SEND_ZC, SQPOLL, and more — and returns an engine.CapabilityProfile that includes the selected engine.Tier. Application code typically does not call this package directly; inspect [celeris.Server.EngineInfo] at runtime for the active feature set. DiagnosticReport and FormatDiagnostic can surface the profile as human-readable text for troubleshooting.
Documentation ¶
Full guides and examples: https://goceleris.dev/docs/engines
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiagnosticReport ¶
func DiagnosticReport(profile engine.CapabilityProfile, logger *slog.Logger)
DiagnosticReport logs the capability profile as structured key-value pairs.
func FormatDiagnostic ¶
func FormatDiagnostic(profile engine.CapabilityProfile) string
FormatDiagnostic returns a human-readable string representation of the capability profile.
func Probe ¶
func Probe() engine.CapabilityProfile
Probe detects system capabilities using the platform-default syscall prober. If CELERIS_MAX_IOURING_TIER is set (none/base/high/optional), the detected io_uring tier and associated features are capped at that level. This allows CI to exercise every tier's code path on modern kernels.
func ProbeWith ¶
func ProbeWith(sp *SyscallProber) engine.CapabilityProfile
ProbeWith detects system capabilities using the provided SyscallProber.
Types ¶
type KernelVersion ¶
KernelVersion represents a parsed Linux kernel version with major, minor, and patch components.
func ParseKernelVersion ¶
func ParseKernelVersion(s string) (KernelVersion, error)
ParseKernelVersion parses a kernel version string such as "5.19.3-arch1".
func (KernelVersion) AtLeast ¶
func (kv KernelVersion) AtLeast(major, minor int) bool
AtLeast reports whether kv is at least major.minor.
func (KernelVersion) String ¶
func (kv KernelVersion) String() string
type SyscallProber ¶
type SyscallProber struct {
ReadKernelVersion func() (string, error)
ProbeIOUring func() (features uint32, ops []uint8, err error)
ProbeEpoll func() bool
CheckCapSysNice func() bool
ReadNUMANodes func() int
}
SyscallProber holds platform-specific functions for probing system capabilities.