Categorygithub.com/nerdynick/ccloud-go-sdk
module
0.0.0-20210429203654-1825ddb910da
Repository: https://github.com/nerdynick/ccloud-go-sdk.git
Documentation: pkg.go.dev

# README

ccloud-go-sdk

A Confluent Cloud GOLang SDK for the Telemetry API

Go Report Card Build Status GoDoc

How To

Install/Get

go get github.com/nerdynick/ccloud-go-sdk

Create Telemetry Client

import "github.com/nerdynick/ccloud-go-sdk/telemetry"

func main(){
    telemetryClient := telemetry.New(MyAPIKey, MyAPISecret)
}

The TelemetryClient also has the following additional attributes that you can adjust to configure how the TelemetryClient interacts with the API

PageLimit  int
DataSet    Dataset
BaseURL    string
MaxWorkers int

Get All Available Resources

import "github.com/nerdynick/ccloud-go-sdk/telemetry"

func main(){
    telemetryClient := telemetry.New(MyAPIKey, MyAPISecret)
    resourceTypes, err := telemetryClient.GetAvailableResources()
}

Get All Available Metrics for a Kafka Cluster

import (
    "github.com/nerdynick/ccloud-go-sdk/telemetry"
    "github.com/nerdynick/ccloud-go-sdk/telemetry/labels"
)

func main(){
    telemetryClient := telemetry.New(MyAPIKey, MyAPISecret)
    metrics, err := telemetryClient.GetAvailableMetricsForResource(labels.ResourceKafka, "MyClusterID")
}

Get All Available Metrics

Do Note: This func is deprecated post Telemetry API V1. You will want to use the GetAvailableMetricsForResource instead.

import "github.com/nerdynick/ccloud-go-sdk/telemetry"

func main(){
    telemetryClient := telemetry.New(MyAPIKey, MyAPISecret)
    metrics, err := telemetryClient.GetAvailableMetrics()
}

Documentation

Full Docs | Telemetry Docs |

# Packages

No description provided by the author
No description provided by the author
No description provided by the author