{"owner":"confluentinc","repo":"confluent-kafka-go","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nconfluent-kafka-go is Confluent's Go client for Apache Kafka. It is a CGo wrapper around [librdkafka](https://github.com/confluentinc/librdkafka), a high-performance C library. The module path is `github.com/confluentinc/confluent-kafka-go/v2`.\n\n## Build & Test Commands\n\n### Building\n```bash\n# Default build (uses statically linked vendored librdkafka)\ngo build ./...\n\n# Build with dynamically linked librdkafka (requires librdkafka installed via pkg-config)\ngo build -tags dynamic ./...\n```\n\n### Testing\n```bash\n# Run unit tests for the kafka package (no broker required)\ngo test ./kafka/...\n\n# Run a single test\ngo test ./kafka/ -run TestLibraryVersion\n\n# Run unit tests for schema registry\ngo test ./schemaregistry/...\n\n# Integration tests live in a separate sub-module (kafka/integration/) so the\n# testcontainers + testify deps don't bleed into the main kafka module's go.mod.\n# Run them from within that module. Tests use docker-compose via testcontainers.\n# Use these flags:\n(cd kafka/integration && go test ./... -docker.needed)    # auto-starts Docker containers\n(cd kafka/integration && go test ./... -docker.exists)    # uses already-running containers\n\n# Run all tests across all packages\nmake -f mk/Makefile \"go test\"\n\n# Vet all packages\nmake -f mk/Makefile \"go vet\"\n```\n\n### Code Generation\n```bash\n# Regenerate error codes from librdkafka (produces kafka/generated_errors.go)\nmake -f mk/Makefile generr\n```\n\n## Architecture\n\n### Two main packages\n\n**`kafka/`** — Core Kafka client (Producer, Consumer, AdminClient)\n- CGo bindings wrapping librdkafka via `#include \"select_rdkafka.h\"`\n- librdkafka is vendored as static libraries in `kafka/librdkafka_vendor/` with per-platform `.a` files and build-tag-gated `build_*.go` files\n- Use build tag `dynamic` to link against system librdkafka instead of vendored static libs\n- Key types: `Producer`, `Consumer`, `AdminClient`, `ConfigMap`, `Message`, `Event`, `Handle` (interface shared by Producer/Consumer)\n- Configuration uses `ConfigMap` (a `map[string]ConfigValue`) matching librdkafka config property names; Go-specific properties are prefixed with `go.`\n- Events are delivered through channels or `.Poll()` — the `Event` interface is implemented by `*Message`, `Error`, `AssignedPartitions`, `RevokedPartitions`, etc.\n- `kafka/generated_errors.go` is auto-generated from librdkafka error codes — do not edit manually\n\n**`schemaregistry/`** — Confluent Schema Registry client and serialization/deserialization (serde)\n- `schemaregistry_client.go` — REST client for Schema Registry API (register/lookup schemas, compatibility checks)\n- `serde/` — Serializer/Deserializer framework with format-specific implementations:\n  - `serde/avro/`, `serde/avrov2/`, and `serde/avrov3/` — Avro (gogen-avro, hamba/avro, and confluentinc/confluent-avro-go respectively)\n  - `serde/jsonschema/` — JSON Schema\n  - `serde/protobuf/` — Protocol Buffers\n- `rules/` — Data contract rules engine (CEL, JSONata, field-level encryption)\n- `cache/` — Schema caching (LRU and map-based)\n\n### Test Configuration\n\nIntegration tests for `kafka/` live in the `kafka/integration/` **sub-module** (own `go.mod`, own `testresources/`) — they use a `testconf` struct populated from `testconf.json` (if present) or defaults to `localhost:9092`, and can spin up Docker containers via testcontainers-go when `-docker.needed` is set. The sub-module isolates the testcontainers + testify dependency surface from the main `kafka` module.\n\nSchema registry integration tests live under `schemaregistry/test/` and use `testcontainers-go/modules/compose`.\n\n## Git\n\n- Always use `git push-external` instead of `git push` (proprietary code check required).\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nconfluent-kafka-go is Confluent's Go client for Apache Kafka. It is a CGo wrapper around [librdkafka](https://github.com/confluentinc/librdkafka), a high-performance C library. The module path is `github.com/confluentinc/confluent-kafka-go/v2`.\n\n## Build & Test Commands\n\n### Building\n```bash\n# Default build (uses statically linked vendored librdkafka)\ngo build ./...\n\n# Build with dynamically linked librdkafka (requires librdkafka installed via pkg-config)\ngo build -tags dynamic ./...\n```\n\n### Testing\n```bash\n# Run unit tests for the kafka package (no broker required)\ngo test ./kafka/...\n\n# Run a single test\ngo test ./kafka/ -run TestLibraryVersion\n\n# Run unit tests for schema registry\ngo test ./schemaregistry/...\n\n# Integration tests live in a separate sub-module (kafka/integration/) so the\n# testcontainers + testify deps don't bleed into the main kafka module's go.mod.\n# Run them from within that module. Tests use docker-compose via testcontainers.\n# Use these flags:\n(cd kafka/integration && go test ./... -docker.needed)    # auto-starts Docker containers\n(cd kafka/integration && go test ./... -docker.exists)    # uses already-running containers\n\n# Run all tests across all packages\nmake -f mk/Makefile \"go test\"\n\n# Vet all packages\nmake -f mk/Makefile \"go vet\"\n```\n\n### Code Generation\n```bash\n# Regenerate error codes from librdkafka (produces kafka/generated_errors.go)\nmake -f mk/Makefile generr\n```\n\n## Architecture\n\n### Two main packages\n\n**`kafka/`** — Core Kafka client (Producer, Consumer, AdminClient)\n- CGo bindings wrapping librdkafka via `#include \"select_rdkafka.h\"`\n- librdkafka is vendored as static libraries in `kafka/librdkafka_vendor/` with per-platform `.a` files and build-tag-gated `build_*.go` files\n- Use build tag `dynamic` to link against system librdkafka instead of vendored static libs\n- Key types: `Producer`, `Consumer`, `AdminClient`, `ConfigMap`, `Message`, `Event`, `Handle` (interface shared by Producer/Consumer)\n- Configuration uses `ConfigMap` (a `map[string]ConfigValue`) matching librdkafka config property names; Go-specific properties are prefixed with `go.`\n- Events are delivered through channels or `.Poll()` — the `Event` interface is implemented by `*Message`, `Error`, `AssignedPartitions`, `RevokedPartitions`, etc.\n- `kafka/generated_errors.go` is auto-generated from librdkafka error codes — do not edit manually\n\n**`schemaregistry/`** — Confluent Schema Registry client and serialization/deserialization (serde)\n- `schemaregistry_client.go` — REST client for Schema Registry API (register/lookup schemas, compatibility checks)\n- `serde/` — Serializer/Deserializer framework with format-specific implementations:\n  - `serde/avro/`, `serde/avrov2/`, and `serde/avrov3/` — Avro (gogen-avro, hamba/avro, and confluentinc/confluent-avro-go respectively)\n  - `serde/jsonschema/` — JSON Schema\n  - `serde/protobuf/` — Protocol Buffers\n- `rules/` — Data contract rules engine (CEL, JSONata, field-level encryption)\n- `cache/` — Schema caching (LRU and map-based)\n\n### Test Configuration\n\nIntegration tests for `kafka/` live in the `kafka/integration/` **sub-module** (own `go.mod`, own `testresources/`) — they use a `testconf` struct populated from `testconf.json` (if present) or defaults to `localhost:9092`, and can spin up Docker containers via testcontainers-go when `-docker.needed` is set. The sub-module isolates the testcontainers + testify dependency surface from the main `kafka` module.\n\nSchema registry integration tests live under `schemaregistry/test/` and use `testcontainers-go/modules/compose`.\n\n## Git\n\n- Always use `git push-external` instead of `git push` (proprietary code check required).\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nconfluent-kafka-go is Confluent's Go client for Apache Kafka. It is a CGo wrapper around [librdkafka](https://github.com/confluentinc/librdkafka), a high-performance C library. The module path is `github.com/confluentinc/confluent-kafka-go/v2`.\n\n## Build & Test Commands\n\n### Building\n```bash\n# Default build (uses statically linked vendored librdkafka)\ngo build ./...\n\n# Build with dynamically linked librdkafka (requires librdkafka installed via pkg-config)\ngo build -tags dynamic ./...\n```\n\n### Testing\n```bash\n# Run unit tests for the kafka package (no broker required)\ngo test ./kafka/...\n\n# Run a single test\ngo test ./kafka/ -run TestLibraryVersion\n\n# Run unit tests for schema registry\ngo test ./schemaregistry/...\n\n# Integration tests live in a separate sub-module (kafka/integration/) so the\n# testcontainers + testify deps don't bleed into the main kafka module's go.mod.\n# Run them from within that module. Tests use docker-compose via testcontainers.\n# Use these flags:\n(cd kafka/integration && go test ./... -docker.needed)    # auto-starts Docker containers\n(cd kafka/integration && go test ./... -docker.exists)    # uses already-running containers\n\n# Run all tests across all packages\nmake -f mk/Makefile \"go test\"\n\n# Vet all packages\nmake -f mk/Makefile \"go vet\"\n```\n\n### Code Generation\n```bash\n# Regenerate error codes from librdkafka (produces kafka/generated_errors.go)\nmake -f mk/Makefile generr\n```\n\n## Architecture\n\n### Two main packages\n\n**`kafka/`** — Core Kafka client (Producer, Consumer, AdminClient)\n- CGo bindings wrapping librdkafka via `#include \"select_rdkafka.h\"`\n- librdkafka is vendored as static libraries in `kafka/librdkafka_vendor/` with per-platform `.a` files and build-tag-gated `build_*.go` files\n- Use build tag `dynamic` to link against system librdkafka instead of vendored static libs\n- Key types: `Producer`, `Consumer`, `AdminClient`, `ConfigMap`, `Message`, `Event`, `Handle` (interface shared by Producer/Consumer)\n- Configuration uses `ConfigMap` (a `map[string]ConfigValue`) matching librdkafka config property names; Go-specific properties are prefixed with `go.`\n- Events are delivered through channels or `.Poll()` — the `Event` interface is implemented by `*Message`, `Error`, `AssignedPartitions`, `RevokedPartitions`, etc.\n- `kafka/generated_errors.go` is auto-generated from librdkafka error codes — do not edit manually\n\n**`schemaregistry/`** — Confluent Schema Registry client and serialization/deserialization (serde)\n- `schemaregistry_client.go` — REST client for Schema Registry API (register/lookup schemas, compatibility checks)\n- `serde/` — Serializer/Deserializer framework with format-specific implementations:\n  - `serde/avro/`, `serde/avrov2/`, and `serde/avrov3/` — Avro (gogen-avro, hamba/avro, and confluentinc/confluent-avro-go respectively)\n  - `serde/jsonschema/` — JSON Schema\n  - `serde/protobuf/` — Protocol Buffers\n- `rules/` — Data contract rules engine (CEL, JSONata, field-level encryption)\n- `cache/` — Schema caching (LRU and map-based)\n\n### Test Configuration\n\nIntegration tests for `kafka/` live in the `kafka/integration/` **sub-module** (own `go.mod`, own `testresources/`) — they use a `testconf` struct populated from `testconf.json` (if present) or defaults to `localhost:9092`, and can spin up Docker containers via testcontainers-go when `-docker.needed` is set. The sub-module isolates the testcontainers + testify dependency surface from the main `kafka` module.\n\nSchema registry integration tests live under `schemaregistry/test/` and use `testcontainers-go/modules/compose`.\n\n## Git\n\n- Always use `git push-external` instead of `git push` (proprietary code check required).\n","category":"root","tokens":954}]}