It's client library written in Golang for interacting with Linkedin Cruise Control using its HTTP API.

go-cruise-control

It's client library (written in Golang) for interacting with Linkedin Cruise Control using its HTTP API.

Supported Cruise Control versions: 2.5.x (tested with v2.5.80)

How to use it

go get github.com/banzaicloud/go-cruise-control@latest
package main

import (
	"fmt"

	"github.com/banzaicloud/go-cruise-control/client"
	"github.com/banzaicloud/go-cruise-control/api"
)

func main() {
    // Initializing Cruise Control client with default configuration
    cruisecontrol, err := client.NewDefaultClient()
    if err != nil {
        panic(err)
    }
    
    // Assembling the request using default values
    req := api.StateRequestWithDefaults()
    // Sending the request to the State API
    resp, err := cruisecontrol.State(req)
    if err != nil {
        panic(err)
    }
    // Getting the state of the Executor
    fmt.Println(resp.Result.ExecutorState.State)
}

Development

Prerequisites

  • golang 1.17
  • docker
  • docker-compose

Development environment

Starting local development environment

make env-up

Tearing down the local development environment

make env-clean

Testing

Running integration tests creates a new test environment prior executing the test suite and tears down at the end.

make integration-test

Set the USE_EXISTING=true environment variable if reusing the existing development/test environment for integration testing is the desired behaviour.

export USE_EXISTING=true
make integration-test

Support

If you encounter problems while using this project than open an issue or talk to us on #kafka-operator channel on the Banzai Cloud Community Slack.

Contributing

If you find this project useful, help us:

  • Support the development of this project and star this repo!
  • Help new users with issues they may encounter 💪
  • Send a pull request with your new features and bug fixes 🚀

License

Copyright © 2021 Cisco and/or its affiliates. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Trademarks

The Banzai Cloud name, the Banzai Cloud logo, and all Banzai Cloud trademarks and logos are registered trademarks of Cisco.

Owner
Banzai Cloud
Bringing cloud native to the enterprise
Banzai Cloud
Comments
  • Fix for cc 2.5.94+

    Fix for cc 2.5.94+

    | Q | A | | --------------- | ------ | | Bug fix? | yes | | New feature? | no | | API breaks? | no| | Deprecations? | yes | | License | Apache 2.0 |

    What's in this PR?

    After release 2.5.94, cruise control uses a double field for the number of cores used in host load and broker load responses instead of int (PR-1839). The go-cruise-control client still uses an int field (see here).

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: x.y.z (if applicable)
    • [x] User guide and development docs updated (if needed)
  • Fix supported CC versions

    Fix supported CC versions

    | Q | A | | --------------- | ------ | | Bug fix? | yes | | New feature? | no | | API breaks? | no| | Deprecations? | yes | | License | Apache 2.0 |

    What's in this PR?

    Updates the readme for the change of the supported CC versions

  • Add StatusCode and RequestURL into APIResponse

    Add StatusCode and RequestURL into APIResponse

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | yes | | API breaks? | no | | Deprecations? | no | | License | Apache 2.0 |

    What's in this PR?

    Extends the APIResponse with HTTP response status code and request URL

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: x.y.z (if applicable)
    • [x] User guide and development docs updated (if needed)
  • feat: update test dependencies

    feat: update test dependencies

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | Related tickets | fixes CVE-2022-1708 | | License | Apache 2.0 |

    What's in this PR?

    • update containerd to fix CVE-2022-1708
    • update docker and docker-cli packages

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: x.y.z (if applicable)
    • [x] User guide and development docs updated (if needed)
  • Fix CVE

    Fix CVE

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | License | Apache 2.0 |

    What's in this PR?

    Updated dependencies to fix the GH reported vulnerabilities:

    • https://github.com/banzaicloud/go-cruise-control/security/dependabot/5
    • https://github.com/banzaicloud/go-cruise-control/security/dependabot/6
  • Upgrade from go 1.17 to 1.18

    Upgrade from go 1.17 to 1.18

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | License | Apache 2.0 |

    What's in this PR?

    Upgrade go version from 1.17 to 1.18

    Checklist

    • [x] Implementation tested
    • [x] User guide and development docs updated (if needed)
  • Updated tests to use cc metrics reporter from version 2.5.86

    Updated tests to use cc metrics reporter from version 2.5.86

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | License | Apache 2.0 |

    What's in this PR?

    Updated integration tests o use CC metrics reporter from lates CC version 2.5.86

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: 2.5.86 (if applicable)
    • [x] User guide and development docs updated (if needed)
  • feat: update test env dependencies

    feat: update test env dependencies

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | Related tickets | fixes CVE-2022-23648 | | License | Apache 2.0 |

    What's in this PR?

    Update test environment dependencies.

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: 2.5.86 (if applicable)
    • [x] User guide and development docs updated (if needed)
  • refactor: always return API response

    refactor: always return API response

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | Related tickets | - | | License | Apache 2.0 |

    What's in this PR?

    Return API response even if the operation failed to make the User-Task-ID available for the requester.

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: 2.5.80
    • [x] User guide and development docs updated (if needed)
  • feat(test): use multiple log dirs in Kafka cluster

    feat(test): use multiple log dirs in Kafka cluster

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | Related tickets | - | | License | Apache 2.0 |

    What's in this PR?

    Update Kafka cluster configuration used for integration testing to have multiple log directories which allows to perform disk rebalance operation via Cruise Control.

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: x.y.z (if applicable)
    • [x] User guide and development docs updated (if needed)
  • feat(test): update test dependencies

    feat(test): update test dependencies

    | Q | A | | --------------- | ------ | | Bug fix? | no | | New feature? | no | | API breaks? | no | | Deprecations? | no | | Related tickets | | | License | Apache 2.0 |

    What's in this PR?

    • update containerd to address CVE-2021-43816
    • update runc to address CVE-2021-43784

    Checklist

    • [x] Implementation tested
    • [x] Tested against Cruise Control version: x.y.z (if applicable)
    • [x] User guide and development docs updated (if needed)
A go library for interacting with Google Verified SMS

verifiedsms This is a go library for interacting with the Google Verified SMS service. You'll need to already be signed up as a Verified SMS Partner t

Aug 18, 2022
A CLI tool for interacting with Kafka through the Confluent Kafka Rest Proxy

kafkactl Table of contents kafkactl Table of contents Overview Build Development Overview kafkactl is a CLI tool to interact with Kafka through the Co

Nov 1, 2021
⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.

APNS/2 APNS/2 is a go package designed for simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the new HTTP/2 Push provide

Jan 1, 2023
golang long polling library. Makes web pub-sub easy via HTTP long-poll server :smiley: :coffee: :computer:
golang long polling library.  Makes web pub-sub easy via HTTP long-poll server :smiley: :coffee: :computer:

golongpoll Golang long polling library. Makes web pub-sub easy via an HTTP long-poll server. New in v1.1 Deprecated CreateManager and CreateCustomMana

Jan 6, 2023
golang client library to Viessmann Vitotrol web service

Package go-vitotrol provides access to the Viessmann™ Vitotrol™ cloud API for controlling/monitoring boilers. See https://www.viessmann.com/app_vitoda

Nov 16, 2022
API for sending sms through the connected modem using golang

SMS sender API API for making SMS sending from modem, by sending post request to route Request for Send SMS url method 127.0.0.1:8000/api/v1/send-mode

Nov 5, 2021
Golang Restful API Messaging using GORM ORM (MySQL) Gorilla Mux

Golang Restful API Messaging using GORM ORM (MySQL) Gorilla Mux Getting Started Folder Structure This is my folder structure under my $GOPATH or $HOME

Dec 14, 2021
Experiments using Go 1.18beta1's Generic typings and the Segmentio kafka-go consumer client

Experiments using Go 1.18beta1's Generic typings and the Segmentio kafka-go consumer client

Jan 28, 2022
franz-go - A complete Apache Kafka client written in Go

franz-go contains a feature complete, pure Go library for interacting with Kafka from 0.8.0 through 2.8.0+. Producing, consuming, transacting, administrating, etc.

Dec 29, 2022
A user friendly RabbitMQ library written in Golang.

TurboCookedRabbit A user friendly RabbitMQ library written in Golang to help use streadway/amqp. Based on my work found at CookedRabbit. Work Recently

Jan 6, 2023
Golang API wrapper for MangaDex v5's MVP API.

mangodex Golang API wrapper for MangaDex v5's MVP API. Full documentation is found here. This API is still in Open Beta, so testing may not be complet

Oct 23, 2022
Go client library SDK for Ably realtime messaging service

Ably Go A Go client library for www.ably.io, the realtime messaging service. Installation ~ $ go get -u github.com/ably/ably-go/ably Feature support T

Dec 2, 2022
Cluster extensions for Sarama, the Go client library for Apache Kafka 0.9

Cluster extensions for Sarama, the Go client library for Apache Kafka 0.9 (and later).

Dec 28, 2022
Apache Pulsar Go Client Library

Apache Pulsar Go Client Library A Go client library for the Apache Pulsar project. Goal This projects is developing a pure-Go client library for Pulsa

Jan 4, 2023
Insta API using Go and Mongodb
Insta API using Go and Mongodb

Insta-API HTTP JSON API that can be used to perform basic tasks of Creating User, Creating Post, Getting User & Post details through their Unique ID.

May 1, 2022
Go library to build event driven applications easily using AMQP as a backend.

event Go library to build event driven applications easily using AMQP as a backend. Publisher package main import ( "github.com/creekorful/event" "

Dec 5, 2021
Producer x Consumer example using Kafka library and Go.

Go - Kafka - Example Apache Kafka Commands First of all, run the docker-compose docker-compose up, than run docker exec -it kafka_kafka_1 bash Topics

Dec 8, 2021
Mizu - API traffic viewer for Kubernetes enabling you to view all API communication between microservices
Mizu - API traffic viewer for Kubernetes enabling you to view all API communication between microservices

The API Traffic Viewer for Kubernetes A simple-yet-powerful API traffic viewer f

Jan 9, 2023
Confluent's Apache Kafka Golang client

Confluent's Golang Client for Apache KafkaTM confluent-kafka-go is Confluent's Golang client for Apache Kafka and the Confluent Platform. Features: Hi

Dec 30, 2022