Documentation
¶
Index ¶
- func AllowedEventType(eventType string) bool
- func IngestFiltered(db *sql.DB, event IngestEvent) (string, error)
- func RebuildEventWindows(db *sql.DB, runID string) (int, error)
- func TelemetrySource(source string, correlationMethod string) bool
- func ValidateRawPayload(eventType, payload string) error
- func ValidateStoredPayload(eventType, payload string) error
- type BatchRecord
- type CorrelationBinding
- type CorrelationContext
- type CorrelationEvent
- type CorrelationEvidence
- type CorrelationIdentity
- type CorrelationMatch
- type CorrelationReport
- type CorrelationReportOptions
- type EventExplanation
- type EventRecord
- type EventWindow
- type EventWindowFilter
- type EventWindowResult
- type FalcoIngestOptions
- type Filter
- type IngestEvent
- type JSONLIngestOptions
- type JSONLIngestResult
- type ListOptions
- type ListResult
- type ReceiverSummary
- type RetentionOptions
- type RetentionResult
- type RowResult
- type SpoolBackpressureError
- type SpoolBatch
- type SpoolEnqueueRequest
- type SpoolListOptions
- type SpoolListResult
- type SpoolProcessResult
- type SpoolProcessedBatch
- type SpoolPruneResult
- type SpoolService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedEventType ¶
func IngestFiltered ¶
func IngestFiltered(db *sql.DB, event IngestEvent) (string, error)
func TelemetrySource ¶
func ValidateRawPayload ¶
func ValidateStoredPayload ¶
Types ¶
type BatchRecord ¶
type BatchRecord struct {
ID string `json:"id"`
RunID string `json:"run_id"`
Format string `json:"format"`
Path string `json:"path"`
FileSHA256 string `json:"file_sha256"`
Read int `json:"read"`
Ingested int `json:"ingested"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
EventIDsSHA256 string `json:"event_ids_sha256"`
CreatedAt string `json:"created_at"`
}
func ListBatches ¶
func ListBatches(db *sql.DB, runID string) ([]BatchRecord, error)
type CorrelationBinding ¶
type CorrelationBinding struct {
ID string `json:"id"`
RunID string `json:"run_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
ContainerID string `json:"container_id,omitempty"`
CgroupID string `json:"cgroup_id,omitempty"`
RootPID int64 `json:"root_pid,omitempty"`
PID int64 `json:"pid,omitempty"`
StartedAt string `json:"started_at,omitempty"`
EndedAt string `json:"ended_at,omitempty"`
BindingSource string `json:"binding_source,omitempty"`
Confidence float64 `json:"confidence"`
IdentityKeys []string `json:"identity_keys,omitempty"`
}
type CorrelationContext ¶
type CorrelationContext struct {
RunID string `json:"run_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
}
type CorrelationEvent ¶
type CorrelationEvidence ¶
type CorrelationEvidence struct {
Event CorrelationEvent `json:"event"`
RawIdentity CorrelationIdentity `json:"raw_identity"`
ResolvedContext CorrelationContext `json:"resolved_context"`
Binding *CorrelationBinding `json:"binding,omitempty"`
Match CorrelationMatch `json:"match"`
Drilldowns []string `json:"drilldowns,omitempty"`
}
type CorrelationIdentity ¶
type CorrelationIdentity struct {
RunID string `json:"run_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
ContainerID string `json:"container_id,omitempty"`
CgroupID string `json:"cgroup_id,omitempty"`
PID int64 `json:"pid,omitempty"`
TGID int64 `json:"tgid,omitempty"`
PPID int64 `json:"ppid,omitempty"`
Keys []string `json:"keys,omitempty"`
}
type CorrelationMatch ¶
type CorrelationMatch struct {
Status string `json:"status"`
Method string `json:"method"`
Confidence float64 `json:"confidence"`
BindingID string `json:"binding_id,omitempty"`
MatchedKeys []string `json:"matched_keys,omitempty"`
Reason string `json:"reason"`
TimeWindow string `json:"time_window,omitempty"`
}
type CorrelationReport ¶
type CorrelationReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id,omitempty"`
EventID string `json:"event_id,omitempty"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Count int `json:"count"`
Items []CorrelationEvidence `json:"correlations"`
}
func BuildCorrelationReport ¶
func BuildCorrelationReport(db *sql.DB, opts CorrelationReportOptions) (CorrelationReport, error)
type EventExplanation ¶
type EventExplanation struct {
Receiver string `json:"receiver"`
SourceFormat string `json:"source_format"`
RawEventID string `json:"raw_event_id,omitempty"`
NormalizedEventType string `json:"normalized_event_type"`
SchemaStatus string `json:"schema_status"`
SchemaError string `json:"schema_error,omitempty"`
IdentityKeys []string `json:"identity_keys,omitempty"`
CorrelationMethod string `json:"correlation_method,omitempty"`
CorrelationConfidence float64 `json:"correlation_confidence,omitempty"`
CorrelationStatus string `json:"correlation_status"`
}
func ExplainEventRecord ¶
func ExplainEventRecord(event EventRecord) EventExplanation
type EventRecord ¶
type EventRecord struct {
ID string `json:"id"`
RunID string `json:"run_id"`
SessionID string `json:"session_id"`
ToolCallID string `json:"tool_call_id"`
ProcessID string `json:"process_id"`
SnapshotID string `json:"snapshot_id"`
RawEventID string `json:"raw_event_id"`
CorrelationMethod string `json:"correlation_method"`
CorrelationConfidence float64 `json:"correlation_confidence"`
ContainerID string `json:"container_id"`
CgroupID string `json:"cgroup_id"`
PID int64 `json:"pid"`
TGID int64 `json:"tgid"`
PPID int64 `json:"ppid"`
Source string `json:"source"`
EventType string `json:"event_type"`
Payload string `json:"payload"`
CreatedAt string `json:"created_at"`
}
func ListEvents ¶
func ListEvents(db *sql.DB, runID, sessionID string) ([]EventRecord, error)
func ListEventsFiltered ¶
func ListEventsFiltered(db *sql.DB, filter Filter) ([]EventRecord, error)
type EventWindow ¶
type EventWindow struct {
RunID string `json:"run_id"`
SessionID string `json:"session_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
Source string `json:"source"`
EventType string `json:"event_type"`
WindowSeconds int `json:"window_seconds"`
WindowStart string `json:"window_start"`
EventCount int `json:"event_count"`
ResolvedCount int `json:"resolved_count"`
UnresolvedCount int `json:"unresolved_count"`
HighRiskCount int `json:"high_risk_count"`
UpdatedAt string `json:"updated_at"`
}
type EventWindowFilter ¶
type EventWindowResult ¶
type EventWindowResult struct {
SchemaVersion string `json:"schema_version"`
Filter EventWindowFilter `json:"filter"`
WindowCount int `json:"window_count"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Windows []EventWindow `json:"windows"`
}
func ListEventWindows ¶
func ListEventWindows(db *sql.DB, filter EventWindowFilter) (EventWindowResult, error)
type FalcoIngestOptions ¶
type IngestEvent ¶
type JSONLIngestOptions ¶
type JSONLIngestResult ¶
type JSONLIngestResult struct {
BatchID string `json:"batch_id,omitempty"`
Format string `json:"format"`
Path string `json:"path"`
FileSHA256 string `json:"file_sha256,omitempty"`
Read int `json:"read"`
Ingested int `json:"ingested"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
EventIDs []string `json:"event_ids,omitempty"`
EventIDsSHA256 string `json:"event_ids_sha256,omitempty"`
PolicyDecisions int `json:"policy_decisions"`
PolicyDecisionIDs []string `json:"policy_decision_ids,omitempty"`
ReceiverSummary ReceiverSummary `json:"receiver_summary"`
Rows []RowResult `json:"row_results,omitempty"`
RowsTruncated bool `json:"row_results_truncated,omitempty"`
Errors []string `json:"errors,omitempty"`
}
func IngestFalco ¶
func IngestFalco(db *sql.DB, opts FalcoIngestOptions, input io.Reader) (JSONLIngestResult, error)
func IngestJSONL ¶
func IngestJSONL(db *sql.DB, opts JSONLIngestOptions) (JSONLIngestResult, error)
type ListOptions ¶
type ListResult ¶
type ListResult struct {
SchemaVersion string `json:"schema_version"`
Filter Filter `json:"filter"`
Limit int `json:"limit"`
Cursor string `json:"cursor,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
HasMore bool `json:"has_more"`
EventCount int `json:"event_count"`
TotalCount int `json:"total_count"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Events []EventRecord `json:"events"`
}
func ListEventsPage ¶
func ListEventsPage(db *sql.DB, opts ListOptions) (ListResult, error)
type ReceiverSummary ¶
type ReceiverSummary struct {
DetectedFormats map[string]int `json:"detected_formats,omitempty"`
EventTypes map[string]int `json:"event_types,omitempty"`
IdentityKeys map[string]int `json:"identity_keys,omitempty"`
Resolved int `json:"resolved"`
Unresolved int `json:"unresolved"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
}
type RetentionOptions ¶
type RetentionResult ¶
type RetentionResult struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id,omitempty"`
Cutoff string `json:"cutoff"`
MaxDelete int `json:"max_delete"`
Scanned int `json:"scanned"`
Deleted int `json:"deleted"`
Protected int `json:"protected"`
DeletedIDs []string `json:"deleted_ids,omitempty"`
}
func PruneRawEvents ¶
func PruneRawEvents(db *sql.DB, opts RetentionOptions) (RetentionResult, error)
type RowResult ¶
type RowResult struct {
Line int `json:"line"`
Status string `json:"status"`
DetectedFormat string `json:"detected_format,omitempty"`
EventID string `json:"event_id,omitempty"`
EventType string `json:"event_type,omitempty"`
Source string `json:"source,omitempty"`
RawEventID string `json:"raw_event_id,omitempty"`
IdentityKeys []string `json:"identity_keys,omitempty"`
CorrelationMethod string `json:"correlation_method,omitempty"`
Error string `json:"error,omitempty"`
}
type SpoolBackpressureError ¶
type SpoolBackpressureError struct {
Queued int `json:"queued"`
MaxQueued int `json:"max_queued"`
Reason string `json:"reason"`
}
func (SpoolBackpressureError) Error ¶
func (e SpoolBackpressureError) Error() string
type SpoolBatch ¶
type SpoolBatch struct {
ID string `json:"id"`
RunID string `json:"run_id"`
Format string `json:"format"`
SourcePath string `json:"source_path"`
SpoolPath string `json:"spool_path"`
FileSHA256 string `json:"file_sha256"`
SizeBytes int64 `json:"size_bytes"`
Status string `json:"status"`
Priority int `json:"priority"`
Attempts int `json:"attempts"`
PolicyEnabled bool `json:"policy_enabled"`
IngestBatchID string `json:"ingest_batch_id"`
IngestedCount int `json:"ingested_count"`
FailedCount int `json:"failed_count"`
Error string `json:"error"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ProcessedAt string `json:"processed_at"`
DroppedAt string `json:"dropped_at"`
DropReason string `json:"drop_reason"`
}
type SpoolEnqueueRequest ¶
type SpoolListOptions ¶
type SpoolListResult ¶
type SpoolListResult struct {
Batches []SpoolBatch `json:"batches"`
NextCursor string `json:"next_cursor,omitempty"`
Limit int `json:"limit"`
}
type SpoolProcessResult ¶
type SpoolProcessResult struct {
Processed int `json:"processed"`
Failed int `json:"failed"`
Batches []SpoolProcessedBatch `json:"batches,omitempty"`
Errors []string `json:"errors,omitempty"`
}
type SpoolProcessedBatch ¶
type SpoolPruneResult ¶
type SpoolService ¶
func (SpoolService) CountQueued ¶
func (s SpoolService) CountQueued() (int, error)
func (SpoolService) Enqueue ¶
func (s SpoolService) Enqueue(req SpoolEnqueueRequest) (SpoolBatch, error)
func (SpoolService) List ¶
func (s SpoolService) List(runID string) ([]SpoolBatch, error)
func (SpoolService) Process ¶
func (s SpoolService) Process(limit int) (SpoolProcessResult, error)
Click to show internal directories.
Click to hide internal directories.