mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
2c0292a618
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
1_create_topic.png | ||
2_list_topics.png | ||
3_store_to_topic.png | ||
4_retrieve_from_topic_real_time.png | ||
0_docs.png | ||
docker-compose.yml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
main.go | ||
postman_collection.json | ||
README.md |
Writing an API for Apache Kafka with Iris
Read the code.
Docker
- Open docker-compose.yml and replace
KAFKA_ADVERTISED_HOST_NAME
with your own local address - Install Docker
- Execute the command below to start kafka stack and the go application:
$ docker-compose up
Troubleshooting
On windows, if you get an error of An attempt was made to access a socket in a way forbidden by its access permissions
Solution:
- Stop Docker
- Open CMD with Administrator privileges and execute the following commands:
$ dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
$ netsh int ipv4 add excludedportrange protocol=tcp startport=2181 numberofports=1
$ dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
$ docker-compose up --build
Manually
Install & run Kafka and Zookeper locally and then:
go run main.go