Home

Awesome

<!-- PROJECT SHIELDS -->

Contributors Forks Stargazers Issues Go

<!-- 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 -->

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

  1. Clone the repo
    git clone https://github.com/iggy-rs/iggy-go-client.git
    
  2. Verify that the solution builds correctly
    cd iggy-go
    go build
    
<!-- USAGE EXAMPLES -->

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:

  1. 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
    
  2. Open new terminal instance and enter iggy-go root folder

    cd iggy-go
    
  3. 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 -->

Roadmap

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:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
<!-- ACKNOWLEDGMENTS -->

Acknowledgments

<!-- MARKDOWN LINKS & IMAGES -->