data_export_kinesis

command
v1.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 10 Imported by: 0

README

Kafka exporter example

This example contains everything you need to export the usage of your flag to AWS Kinesis.

How to setup the example

All commands should be run in the root level of the repository.

  1. Start a kafka server by running:
docker-compose -f examples/data_export_kinesis/docker-compose.yml up
  1. Create python virtualenv & Install awslocal
mkvirtualenv go-features-flag-kinesis
# or activate existent
workon go-features-flag-kinesis
pip install awscli awscli-local
  1. Create a topic in Kinesis:
awslocal kinesis create-stream --stream-name test-stream --region us-east-1
  1. Update dependencies:
make vendor
  1. Run the example application:
go run ./examples/data_export_kinesis/main.go

If you check the logs, you should see the events being sent 1 by 1 to kinesis.

  1. Read the items in the topic:
SHARD_ITERATOR=$(awslocal kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name test-stream --query 'ShardIterator' --region us-east-1)

awslocal kinesis get-records --shard-iterator $SHARD_ITERATOR --region us-east-1

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL