kafkaquota

package
v0.0.0-...-cfb2aad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const QuotaLimit = 62914560
View Source
const QuotasTemplate = `{{ range . }}
  - clientId: {{ .ClientID }}
    perBrokerProducerByteRate: {{ .Quota }} # {{ .HumanReadableQuota }}
{{ end }}`

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaClient

type KafkaClient struct {
	ID                string `json:"clientId"`
	AverageThroughput float64
	MaxThroughput     int
}

func GetAllClients

func GetAllClients(nrAPIKey string) []KafkaClient

type KafkaQuota

type KafkaQuota struct {
	ClientID           string `json:"clientId"`
	Quota              int    `json:"perBrokerProducerByteRate"`
	HumanReadableQuota string
}

func GenerateQuotasForClients

func GenerateQuotasForClients(clients []KafkaClient, throughputMultiplier int) []KafkaQuota

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL