Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #173 and #174 #180

Merged
merged 5 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/producers/gcs/gcsProducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ func (p *GCSProducer) Produce(k []byte, v []byte, o any) {
if k == nil || len(k) == 0 {
// generate a UUID as index
id := uuid.New()
key = id.String() + "/.json"
key = id.String()
} else {
key = string(k) + "/.json"
key = string(k)
}

objectHandle := p.client.Bucket(bucket).Object(key)
Expand Down
8 changes: 4 additions & 4 deletions pkg/producers/s3/s3Producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ func (p *S3Producer) Produce(k []byte, v []byte, o any) {
if k == nil || len(k) == 0 {
hifly81 marked this conversation as resolved.
Show resolved Hide resolved
// generate a UUID as index
id := uuid.New()
key = id.String() + "/.json"
key = id.String()
} else {
key = string(k) + "/.json"
key = string(k)
}

buffer := bytes.NewReader(v)

//object will be stored with no content type
_, err := p.client.PutObject(&s3.PutObjectInput{
Body: buffer,
Body: bytes.NewReader(v),
Bucket: aws.String(bucket),
Key: aws.String(key),
})
Expand Down
Loading