Awesome
<!-- PROJECT SHIELDS --> <!-- PROJECT LOGO --> <br /> <div align="center"> <!-- <a href="https://github.com/iggy-rs/iggy-go-client"> <img src="images/logo.png" alt="Logo" width="80" height="80"> </a> --> <h3 align="center">iggy-go</h3> <p align="center"> SDK for iggy written using go language <!-- <br /> <a href="https://github.com/iggy-rs/iggy-go-client"><strong>Explore the docs »</strong></a> <br /> --> <br /> <a href="https://github.com/iggy-rs/iggy-go-client/tree/dev/samples">View Samples</a> · <a href="https://github.com/iggy-rs/iggy-go-client/issues">Report Bug</a> · <a href="https://github.com/iggy-rs/iggy-go-client/issues">Request Feature</a> · <a href="https://docs.iggy.rs/">iggy documentation</a> </p> </div> <!-- ABOUT THE PROJECT -->About The Project
iggy-go
is a golang SDK for <a href="https://github.com/iggy-rs/iggy">iggy</a> - persistent message streaming platform written in Rust.
Getting Started
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Prerequisites
In order to use this SDK you need to install golang on your environment. Here's a <a hfref="https://go.dev/doc/install">link to official go documentation</a> explaining how you can do that!
Installation
- Clone the repo
git clone https://github.com/iggy-rs/iggy-go-client.git
- Verify that the solution builds correctly
cd iggy-go go build
Usage (OBSOLETE; will be updated soon)
If you want to use this sdk as a CLI tool, you can do that by following these steps:
-
Clone iggy repo and run it in background
git clone https://github.com/iggy-rs/iggy.git cd iggy cargo r --bin iggy-server -r
-
Open new terminal instance and enter
iggy-go
root foldercd iggy-go
-
Run your command
go run ./cli <commandname>
You can run
help
command if you would like to see available commands:$ go run ./cli help Usage: getstream -url <url> -port <port> -streamId <streamId> createstream -url <url> -port <port> -streamId <streamId> -name <name> deletestream -url <url> -port <port> -streamId <streamId> gettopic -url <url> -port <port> -streamId <streamId> -topicId <topicId> createtopic -url <url> -port <port> -streamId <streamId> -topicId <topicId> -name <name> -partitionsCount <partitionsCount> deletetopic -url <url> -port <port> -streamId <streamId> -topicId <topicId>
Some parameters don't have default values so you have to define them manually:
$ go run ./cli createstream Error: Name flag is required. -n string Stream name -name string Stream name -port string Iggy server port (default "8090") -s int Alias for Stream Id (default 1) -sid int Alias for Stream Id (default 1) -streamid int Stream Id (default 1) -url string Iggy server url (default "127.0.0.1")
This is how
createstream
command is called correctly$ go run ./cli createstream -s 1 -n stream_name
Roadmap
- Basic CLI tool (already obsolete)
- Samples
- Rewrite the CLI tool using CLI frameworks (like Cobra/Viper)
- Implementing all iggy features in the SDK
- TCP
- HTTP (can be picked up at any moment)
- QUIC
- Implementing benchmarks
- Implementing optional logging
- Implementing tests
- Unit tests for binary serialization
- BDD integration tests
- Improve BDD tests assertions, so they can detect breaking changes in iggy-server
- Human friendly error handling
- Documentation
- GitHub actions CI/CD
- Publishing to official golang packages repository
See the open issues for a full list of proposed features (and known issues).
<!-- CONTRIBUTING -->Contributing
If you believe that you can improve this SDK feel free to contribute. Here's how you can do it:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request