diff --git a/kafka/api.html b/kafka/api.html index 8c495b37e..c53cbd87b 100644 --- a/kafka/api.html +++ b/kafka/api.html @@ -14,7 +14,7 @@ @@ -752,6 +752,11 @@

func (c *Consumer) SetOAuthBearerTokenFailure(errstr string) error +
+ + func (c *Consumer) StoreMessage(m *Message) (storedOffsets []TopicPartition, err error) + +
func (c *Consumer) StoreOffsets(offsets []TopicPartition) (storedOffsets []TopicPartition, err error) @@ -912,6 +917,26 @@

type Metadata

+
+ + type MockCluster + +
+
+ + func NewMockCluster(brokerCount int) (*MockCluster, error) + +
+
+ + func (mc *MockCluster) BootstrapServers() string + +
+
+ + func (mc *MockCluster) Close() + +
type OAuthBearerToken @@ -1214,8 +1239,8 @@

adminoptions.go - - build_glibc_linux.go + + build_darwin.go config.go @@ -1259,6 +1284,9 @@

misc.go + + mockcluster.go + offset.go @@ -1335,7 +1363,7 @@

LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client

-
const LibrdkafkaLinkInfo = "static glibc_linux from librdkafka-static-bundle-v1.8.2.tgz"
+
const LibrdkafkaLinkInfo = "static darwin from librdkafka-static-bundle-v1.9.0.tgz"

OffsetBeginning represents the earliest offset (logical)

@@ -1359,7 +1387,7 @@

const PartitionAny = int32(C.RD_KAFKA_PARTITION_UA)

func - + LibraryVersion

+ NewConsumer

+ Assignment

+ Close

+ Committed

+ Events

+ GetConsumerGroupMetadata

+ GetMetadata

+ GetWatermarkOffsets

+ Logs

+ OffsetsForTimes

+ Pause

+ Poll

+ Position

+ QueryWatermarkOffsets

+ ReadMessage

+ Resume

+ Seek

+ SetOAuthBearerToken

+ SetOAuthBearerTokenFailure

+ StoreMessage + + +

+
func (c *Consumer) StoreMessage(m *Message) (storedOffsets []TopicPartition, err error)
+

+ StoreMessage stores offset based on the provided message. +This is a convenience method that uses StoreOffsets to do the actual work.

func (*Consumer) @@ -2833,7 +2875,7 @@

func (*Consumer) - + Subscription

+ ConsumerGroupMetadata

+ NewTestConsumerGroupMetadata

+ ErrorCode

+ String

BrokerMetadata } +

+ type + + MockCluster + + +

+

+ MockCluster represents a Kafka mock cluster instance which can be used +for testing. +

+
type MockCluster struct {
+    // contains filtered or unexported fields
+}
+
+

+ func + + NewMockCluster + + +

+
func NewMockCluster(brokerCount int) (*MockCluster, error)
+

+ NewMockCluster provides a mock Kafka cluster with a configurable +number of brokers that support a reasonable subset of Kafka protocol +operations, error injection, etc. +

+

+ Mock clusters provide localhost listeners that can be used as the bootstrap +servers by multiple Kafka client instances. +

+

+ Currently supported functionality: +- Producer +- Idempotent Producer +- Transactional Producer +- Low-level consumer +- High-level balanced consumer groups with offset commits +- Topic Metadata and auto creation +

+

+ Warning THIS IS AN EXPERIMENTAL API, SUBJECT TO CHANGE OR REMOVAL. +

+

+ func (*MockCluster) + + BootstrapServers + + +

+
func (mc *MockCluster) BootstrapServers() string
+

+ BootstrapServers returns the bootstrap.servers property for this MockCluster +

+

+ func (*MockCluster) + + Close + + +

+
func (mc *MockCluster) Close()
+

+ Close and destroy the MockCluster +

type @@ -4570,7 +4686,7 @@

type - + TopicPartition

+ String

TopicPartition) String() string

type - + TopicPartitions

TopicPartition

func (TopicPartitions) - + Len

TopicPartitions) Len() int

func (TopicPartitions) - + Less

TopicPartitions) Less(i, j int) bool

func (TopicPartitions) - + Swap

diff --git a/kafka/generated_errors.go b/kafka/generated_errors.go index fb828f9e6..568c831e8 100644 --- a/kafka/generated_errors.go +++ b/kafka/generated_errors.go @@ -1,6 +1,6 @@ package kafka -// Copyright 2016-2021 Confluent Inc. -// AUTOMATICALLY GENERATED ON 2021-12-08 12:44:39.243338672 +0100 CET m=+0.000248284 USING librdkafka 1.8.2 +// Copyright 2016-2022 Confluent Inc. +// AUTOMATICALLY GENERATED ON 2022-06-16 11:17:24.861602 -0700 PDT m=+0.000650282 USING librdkafka 1.9.0 /* #include "select_rdkafka.h"