exporter

package
v0.0.0-...-5655933 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SHA256 scram.HashGeneratorFcn = func() hash.Hash { return sha256.New() }
View Source
var SHA512 scram.HashGeneratorFcn = func() hash.Hash { return sha512.New() }

Functions

func CanReadCertAndKey

func CanReadCertAndKey(certPath, keyPath string) (bool, error)

CanReadCertAndKey returns true if the certificate and key files already exists, otherwise returns false. If lost one of cert and key, returns error.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter collects Kafka stats from the given server and exports them using the prometheus metrics package.

func New

func New(logger log.Logger, opts Options, topicFilter, groupFilter string) (*Exporter, error)

New returns an initialized Exporter.

func (*Exporter) Close

func (e *Exporter) Close()

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics ever exported by the Kafka exporter. It implements prometheus.Collector.

func (*Exporter) RunPruner

func (e *Exporter) RunPruner()

Run iMap.Prune() on an interval (default 30 seconds). A new client is created to avoid an issue where the client may be closed before Prune attempts to use it.

type Options

type Options struct {
	Uri                        []string
	UseSASL                    bool
	UseSASLHandshake           bool
	SaslUsername               string
	SaslPassword               string
	SaslMechanism              string
	UseTLS                     bool
	TlsCAFile                  string
	TlsCertFile                string
	TlsKeyFile                 string
	TlsInsecureSkipTLSVerify   bool
	KafkaVersion               string
	UseZooKeeperLag            bool
	UriZookeeper               []string
	Labels                     string
	MetadataRefreshInterval    string
	OffsetShowAll              bool
	AllowConcurrent            bool
	MaxOffsets                 int
	PruneIntervalSeconds       int
	DisableCalculateLagRate    bool
	RenameUncommitOffsetsToLag bool
}

type PromDesc

type PromDesc struct {
	// contains filtered or unexported fields
}

type XDGSCRAMClient

type XDGSCRAMClient struct {
	*scram.Client
	*scram.ClientConversation
	scram.HashGeneratorFcn
}

func (*XDGSCRAMClient) Begin

func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)

func (*XDGSCRAMClient) Done

func (x *XDGSCRAMClient) Done() bool

func (*XDGSCRAMClient) Step

func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)

Jump to

Keyboard shortcuts

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