interface intercept-types { // Plugin context record context { auth: option>, connection: connection-ctx, event: event-ctx, } variant connection-ctx { websocket(websocket), } variant event-ctx { kafka(kafka-event-ctx), counter(counter-event-ctx), } record counter-event-ctx { source-id: string, count: u64, } record kafka-event-ctx { payload: option>, source-id: string, topic: string, timestamp: option, partition: u32, offset: u64, } record websocket { addr: option, } variant transformed-payload { kafka(option>), counter(u64), } variant action { forward, discard, transform(transformed-payload), } }