This repository has been archived on 2026-03-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
greywall/internal/sandbox/linux_ebpf_stub.go
2025-12-25 20:47:11 -08:00

46 lines
1.2 KiB
Go

//go:build !linux
package sandbox
import "time"
// EBPFMonitor is a stub for non-Linux platforms.
type EBPFMonitor struct{}
// NewEBPFMonitor creates a stub monitor.
func NewEBPFMonitor(pid int, debug bool) *EBPFMonitor {
return &EBPFMonitor{}
}
// Start is a no-op on non-Linux platforms.
func (m *EBPFMonitor) Start() error { return nil }
// Stop is a no-op on non-Linux platforms.
func (m *EBPFMonitor) Stop() {}
// IsEBPFAvailable returns false on non-Linux platforms.
func IsEBPFAvailable() bool { return false }
// RequiredCapabilities returns empty on non-Linux platforms.
func RequiredCapabilities() []string { return nil }
// CheckBpftraceAvailable returns false on non-Linux platforms.
func CheckBpftraceAvailable() bool { return false }
// ViolationEvent is a stub for non-Linux platforms.
type ViolationEvent struct {
Timestamp time.Time
Type string
Operation string
Path string
PID int
Comm string
Errno int
}
// FormatViolation returns empty on non-Linux platforms.
func (v *ViolationEvent) FormatViolation() string { return "" }
// EnsureTracingSetup returns nil on non-Linux platforms.
func EnsureTracingSetup() error { return nil }