From ddb1c5c29f6aac8b95cc8980284737d7894fcb5e Mon Sep 17 00:00:00 2001 From: Magnus Edenhill Date: Wed, 6 May 2020 14:26:51 +0200 Subject: [PATCH] Documentation updates (and fixes #460) --- kafka/README.md | 24 +++++----- kafka/api.html | 117 +++++++++++++++++++++++++++++----------------- kafka/producer.go | 2 +- mk/doc-gen.py | 2 +- 4 files changed, 88 insertions(+), 57 deletions(-) diff --git a/kafka/README.md b/kafka/README.md index 5da82c482..98152e9e3 100644 --- a/kafka/README.md +++ b/kafka/README.md @@ -44,16 +44,21 @@ $ go test -coverprofile=coverage.out -bench=. $ go tool cover -func=coverage.out ``` -## Build tags (static linking) +## Build tags Different build types are supported through Go build tags (`-tags ..`), -these tags should be specified on the **application** build command. +these tags should be specified on the **application** build/get/install command. - * `static` - Build with librdkafka linked statically (but librdkafka - dependencies linked dynamically). - * `static_all` - Build with all libraries linked statically. - * neither - Build with librdkafka (and its dependencies) linked dynamically. + * By default the bundled platform-specific static build of librdkafka will + be used. This works out of the box on Mac OSX and glibc-based Linux distros, + such as Ubuntu and CentOS. + * `-tags musl` - must be specified when building on/for musl-based Linux + distros, such as Alpine. Will use the bundled static musl build of + librdkafka. + * `-tags dynamic` - link librdkafka dynamically. A shared librdkafka library + must be installed manually through other means (apt-get, yum, build from + source, etc). @@ -74,12 +79,9 @@ $ make -f mk/Makefile docs For each release candidate and final release, perform the following steps: -### Install librdkafka +### Update bundle to latest librdkafka -Make sure the librdkafka version installed is the version this release -is aimed to be used with. - -E.g., confluent-kafka-go v1.3.0 will require librdkafka v1.3.0. +See instructions in [kafka/librdkafka/README.md](kafka/librdkafka/README.md). ### Update librdkafka version requirement diff --git a/kafka/api.html b/kafka/api.html index 88dc4ec12..2518d8979 100644 --- a/kafka/api.html +++ b/kafka/api.html @@ -381,6 +381,11 @@

func LibraryVersion() (int, string) +
+ + func WriteErrorCodes(f *os.File) + +
type AdminClient @@ -1188,8 +1193,8 @@

adminoptions.go - - build_dynamic.go + + build_glibc_linux.go config.go @@ -1203,6 +1208,9 @@

error.go + + error_gen.go + event.go @@ -1303,6 +1311,10 @@

// AlterOperationSet sets/overwrites the configuration setting. AlterOperationSet = iota ) +

+ LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client +

+
const LibrdkafkaLinkInfo = "static glibc_linux from librdkafka-static-bundle-v1.4.0.tgz"

OffsetBeginning represents the earliest offset (logical)

@@ -1326,7 +1338,7 @@

const PartitionAny = int32(C.RD_KAFKA_PARTITION_UA)

func - + LibraryVersion

+ WriteErrorCodes + + +

+
func WriteErrorCodes(f *os.File)
+

+ WriteErrorCodes writes Go error code constants to file from the +librdkafka error codes. +This function is not intended for public use.

type @@ -2254,7 +2281,7 @@

func (*Consumer) - + Assignment

+ Committed

+ GetConsumerGroupMetadata

+ OffsetsForTimes

+ Pause

+ Position

+ Resume

+ SetOAuthBearerToken

+ SetOAuthBearerTokenFailure

+ Subscription

+ ConsumerGroupMetadata

+ NewTestConsumerGroupMetadata

+ Error

+ NewError

+ Code

+ Error

+ IsFatal

+ IsRetriable

+ String

+ TxnRequiresAbort

+ ErrorCode

+ String

+ AbortTransaction

+ BeginTransaction

+ CommitTransaction

+ GetFatalError

+ InitTransactions

+ OffsetsForTimes

+ SendOffsetsToTransaction

+ SetOAuthBearerToken

+ SetOAuthBearerTokenFailure

+ TestFatalError

+ 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