This Go program helps you process event streams generated from an AWS S3 SelectObjectContent
operation. It provides a function named awsEventStream
that takes the SelectObjectContentOutput
and iterates through the received events, allowing you to process them as needed.
Ensure you have Go installed on your system.
Clone this repository using your preferred Git client:
git clone https://github.com/vishwaratna/awsEventStream_Test_coverage.git
Use code with caution.
Import the required packages in your project:
import (
"github.com/aws/aws-sdk-go/service/s3"
"log"
)
Call the awsEventStream function with the SelectObjectContentOutput obtained from your S3 operation:
output, err := s3Client.SelectObjectContent(input)
if err != nil {
log.Fatal(err)
}
err = awsEventStream(output)
if err != nil {
log.Fatal(err)
}
Within the awsEventStream function, implement your custom logic to handle each processed event.
This project includes unit tests to verify functionalities. To run the tests:
Navigate to the project directory containing the code. Run the following command in your terminal:
go test
Use code with caution.
We welcome contributions to this project! Feel free to fork the repository, make your changes, and submit a pull request.
Remember to handle errors appropriately within your code using the provided error information.