Go examples: add a sink data producer

オープン 初心者向け
#4,792 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
backend

調査の方向性

examples/python/sink-data-producer/producer.pyとそのREADMEの節を読み、続いてexamples/go/common/client.goとexamples/go/getting-started/producer/main.goを調べて、接続とセットアップのパターンを確認してください。指定された環境変数とレコードフィールドを使って、examples/go/sink-data-producer/main.goとREADMEの節を追加してください。READMEのgo runコマンドが新しいサーバーで動作し、不足しているリソースを作成し、要求されたバッチを送信し、go vet ./...が成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

go good first issue
Description

The Rust, Java, Node and Python examples include a sink data producer, which fills a topic with JSON records so a sink connector has something to read. The Go examples have none.

Affected area / component

Go examples

Proposed solution

Add examples/go/sink-data-producer/main.go and a "Sink Data Producer" section in examples/go/README.md.

  • Use examples/python/sink-data-producer/producer.py and its README section as the model. Match the Rust and Python record fields (user_id, user_type, email, source, state, created_at, message) so one connector config works for every SDK. The Node version uses a different set, so do not copy from it.
  • Use the same environment variables as the Python README: IGGY_STREAM (default qw), IGGY_TOPIC (default records), IGGY_ADDRESS, IGGY_USERNAME and IGGY_PASSWORD.
  • examples/go/common/client.go and examples/go/getting-started/producer/main.go show connecting, logging in and creating the stream and topic.
  • The producer creates the stream and topic if they are missing, sends 100 batches of 100 to 499 records, logs the total and exits. Running it again against the same server works, and the stream and topic are kept.
  • Put the command in a go run line in the README, so scripts/run-examples-from-readme.sh runs it in CI.

TLS is out of scope.

How to test: start a fresh server (cargo run --bin iggy-server -- --fresh --with-default-root-credentials), run the producer from examples/go with the README command, poll a few messages back to check they are valid JSON, and run go vet ./... in examples/go.

Good first issue
  • I think this could be a good first issue for a new contributor
主要言語
Rust
スター
5.2k
フォーク
516
平均マージ
2日 12時間
マージ済み PR(30日)
145

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。