Skip to content

Implement basic event ingestion module in Rust #3

Description

@AbdulSnk

Overview

StreamForge Core needs a foundational event ingestion module responsible for receiving and parsing contribution events (e.g. commits, pull requests, reviews) from upstream sources.

What needs to be done

  • Create an ingestion module under src/
  • Define a basic Event struct with the following fields:
    • id (String)
    • event_type (String — e.g. "pull_request", "commit", "review")
    • contributor (String)
    • timestamp (u64)
    • metadata (optional key-value map)
  • Implement a function to receive and parse a raw event into the Event struct
  • Handle malformed or missing fields gracefully with proper error types

Acceptance Criteria

  • src/ingestion.rs module exists and is wired into main.rs
  • Event struct is defined with the fields listed above
  • Parsing function correctly handles valid and invalid inputs
  • Unit tests cover at least: valid event, missing field, malformed input

Pre-Submission Checklist

  • I have run cargo build locally and it succeeds
  • I have run cargo test locally and all tests pass
  • I have run cargo fmt to format my code
  • I have run cargo clippy and fixed all warnings

Notes

This is the foundational building block of StreamForge Core. Keep the implementation simple and well-documented.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions