A go REST-client library for LinkedIn's Cruise Control.
package main
import (
"fmt"
gocc "github.com/tinyzimmer/go-cruise-control"
"github.com/tinyzimmer/go-cruise-control/pkg/types"
)
func main() {
client, err := gocc.New(&types.ClientOptions{
URL: "http://localhost:8090",
})
if err != nil {
panic(err)
}
res, err := client.GetState(types.GetStateDefaults())
if err != nil {
panic(err)
}
fmt.Println(res.MonitorState.State)
}