Skip to content

Conversation

foogaro
Copy link
Contributor

@foogaro foogaro commented Dec 2, 2024

No description provided.

@hifly81 hifly81 requested review from Copilot and ugol March 20, 2025 07:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Redis hash and JSON producers to handle two different data formats, along with updates in the emitter and CLI commands to allow users to select the desired Redis data type.

  • Introduces a new JSONProducer (and corresponding tests) alongside the existing HashProducer.
  • Updates the emitter to create the proper Redis producer based on the output mode.
  • Adjusts CLI flags and the producer list to include "redishash" and "redisjson" options.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/producers/redis/jsonProducer.go New JSON producer implementation for storing JSON data
pkg/producers/redis/hashProducer_test.go Added tests for HashProducer
pkg/producers/redis/hashProducer.go Hash producer implementation
pkg/producers/redis/jsonProducer_test.go Added tests for JSONProducer
pkg/emitter/emitter.go Updated emitter to support both Redis hash and JSON producers
pkg/cmd/templateRun.go Updated CLI output flag descriptions to include redis options
pkg/cmd/producerList.go Updated producer list to display redisjson and redishash options
Comments suppressed due to low confidence (1)

pkg/producers/redis/hashProducer.go:14

  • Consider changing the Redis client field to a pointer (*redis.Client) to align with the go-redis library's intended usage and avoid potential issues with internal state management.
client redis.Client

@hifly81
Copy link
Collaborator

hifly81 commented Mar 20, 2025

LGTM!

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants