Documentation
¶
Index ¶
- Variables
- type Error
- func New(code ErrorCode, message string) *Error
- func NewConfigurationError(message string, cause error) *Error
- func NewEBPFAttachError(probe string, cause error) *Error
- func NewEBPFLoadError(program string, cause error) *Error
- func NewEventDecodeError(eventType string, cause error) *Error
- func NewEventDispatchError(cause error) *Error
- func NewProbeCloseError(probeName string, cause error) *Error
- func NewProbeInitError(probeName string, cause error) *Error
- func NewProbeStartError(probeName string, cause error) *Error
- func NewProbeStopError(probeName string, cause error) *Error
- func NewResourceNotFoundError(resource string) *Error
- func Wrap(code ErrorCode, message string, cause error) *Error
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
var ErrEventNotReady = New(ErrCodeEventNotReady, "event not ready yet")
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error represents a structured error in eCapture.
func NewConfigurationError ¶
NewConfigurationError creates a configuration error.
func NewEBPFAttachError ¶
NewEBPFAttachError creates an eBPF attach error.
func NewEBPFLoadError ¶
NewEBPFLoadError creates an eBPF load error.
func NewEventDecodeError ¶
NewEventDecodeError creates an event decode error.
func NewEventDispatchError ¶
NewEventDispatchError creates an event dispatch error.
func NewProbeCloseError ¶
NewProbeCloseError creates a probe close error.
func NewProbeInitError ¶
NewProbeInitError creates a probe initialization error.
func NewProbeStartError ¶
NewProbeStartError creates a probe start error.
func NewProbeStopError ¶
NewProbeStopError creates a probe stop error.
func NewResourceNotFoundError ¶
NewResourceNotFoundError creates a resource not found error.
type ErrorCode ¶
type ErrorCode int
ErrorCode defines standardized error codes for eCapture.
Configuration errors (1xx)
const ( ErrCodeProbeInit ErrorCode = 200 + iota ErrCodeProbeStart ErrCodeProbeStop ErrCodeProbeClose )
Probe lifecycle errors (2xx)
const ( ErrCodeEventDecode ErrorCode = 300 + iota ErrCodeEventDispatch ErrCodeEventValidation ErrCodeEventNotReady )
Event processing errors (3xx)
eBPF errors (4xx)