probe

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package probe provides capability detection for io_uring and epoll.

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.

func ProbeWith

func ProbeWith(sp *SyscallProber) engine.CapabilityProfile

ProbeWith detects system capabilities using the provided SyscallProber.

Types

type KernelVersion

type KernelVersion struct {
	Major int
	Minor int
	Patch int
	Extra string
}

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.

Jump to

Keyboard shortcuts

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