Coder Social home page Coder Social logo

isabella232 / go-cruise-control Goto Github PK

View Code? Open in Web Editor NEW

This project forked from attic/go-cruise-control

0.0 0.0 0.0 156 KB

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

License: Apache License 2.0

Shell 3.16% Go 95.29% Makefile 1.56%

go-cruise-control's Introduction

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.

go-cruise-control's People

Contributors

chrisgacsal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.