EventProcessor defines the processing strategy for each event type. Each processor implements its own Transform logic supporting Raw/Compact modes. The framework decides which mode to pass based on CLI flags; the processor decides the output format for that mode. Raw mode: return raw (the complete
| 46 | // Compact mode: return a flat map[string]interface{} ready for JSON serialization, |
| 47 | // including semantic fields like "type", "id", "from", "to" plus domain-specific fields. |
| 48 | type EventProcessor interface { |
| 49 | // EventType returns the event type handled, e.g. "im.message.receive_v1". |
| 50 | // The fallback processor returns an empty string. |
| 51 | EventType() string |
| 52 | |
| 53 | // Transform converts raw event data to the target format. |
| 54 | // The returned value is serialized directly to JSON by the pipeline. |
| 55 | Transform(ctx context.Context, raw *RawEvent, mode TransformMode) interface{} |
| 56 | |
| 57 | // DeduplicateKey returns a deduplication key. Empty string means no dedup. |
| 58 | DeduplicateKey(raw *RawEvent) string |
| 59 | |
| 60 | // WindowStrategy returns window configuration. Zero value means disabled. |
| 61 | WindowStrategy() WindowConfig |
| 62 | } |
no outgoing calls
no test coverage detected