Skip to content

Commit bf92b5b

Browse files
committed
remove kafka supprot
Signed-off-by: Wei Liu <liuweixa@redhat.com>
1 parent e3c5205 commit bf92b5b

75 files changed

Lines changed: 9 additions & 30650 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
1212
GO_PACKAGES :=$(addsuffix ...,$(addprefix ./,$(filter-out test/, $(filter-out vendor/,$(filter-out hack/,$(wildcard */))))))
1313
GO_BUILD_PACKAGES :=$(GO_PACKAGES)
1414
GO_BUILD_PACKAGES_EXPANDED :=$(GO_BUILD_PACKAGES)
15-
GO_BUILD_FLAGS :=-trimpath -tags=kafka
16-
GO_TEST_FLAGS :=-race -tags=kafka
15+
GO_BUILD_FLAGS :=-trimpath
16+
GO_TEST_FLAGS :=-race
1717
# LDFLAGS are not needed for dummy builds (saving time on calling git commands)
1818
GO_LD_FLAGS:=
1919

2020
verify-gocilint:
2121
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.6
22-
${GOPATH}/bin/golangci-lint run --build-tags=kafka --timeout=3m ./...
22+
${GOPATH}/bin/golangci-lint run --timeout=3m ./...
2323

2424
verify-govet:
25-
go vet -mod=vendor -tags=kafka ./...
25+
go vet -mod=vendor ./...
2626

2727
verify: verify-gocilint
2828

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ The SDK includes comprehensive CloudEvents-based clients for implementing event-
2222
**Supported Protocols:**
2323
- MQTT Protocol/Driver
2424
- gRPC Protocol/Driver
25-
- Kafka Protocol/Driver
2625

2726
**Key Features:**
2827
- Generic CloudEvents clients for custom resources

go.mod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ go 1.24.0
44

55
require (
66
github.com/bwmarrin/snowflake v0.3.0
7-
github.com/cloudevents/sdk-go/protocol/kafka_confluent/v2 v2.0.0-20240413090539-7fef29478991
87
github.com/cloudevents/sdk-go/protocol/mqtt_paho/v2 v2.0.0-20250922144431-372892d7c84d
98
github.com/cloudevents/sdk-go/v2 v2.16.2
10-
github.com/confluentinc/confluent-kafka-go/v2 v2.3.0
119
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
1210
github.com/eclipse/paho.golang v0.23.0
1311
github.com/evanphx/json-patch/v5 v5.9.11
@@ -75,7 +73,6 @@ require (
7573
github.com/rs/xid v1.4.0 // indirect
7674
github.com/stoewer/go-strcase v1.3.0 // indirect
7775
github.com/x448/float16 v0.8.4 // indirect
78-
go.opencensus.io v0.24.0 // indirect
7976
go.opentelemetry.io/otel v1.33.0 // indirect
8077
go.opentelemetry.io/otel/trace v1.33.0 // indirect
8178
go.uber.org/multierr v1.11.0 // indirect

go.sum

Lines changed: 0 additions & 60 deletions
Large diffs are not rendered by default.

pkg/cloudevents/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ Currently, the CloudEvents options supports the following protocols/drivers:
116116

117117
- [MQTT Protocol/Driver](./generic/options/mqtt)
118118
- [gRPC Protocol/Driver](./generic/options/grpc)
119-
- [Kafka Protocol/Driver](./generic/options/kafka)
120119

121120
To create CloudEvents source/agent options for these supported protocols/drivers, developers need to provide configuration specific to the protocol/driver. The configuration format resembles the kubeconfig for the Kubernetes client-go but has a different schema.
122121

@@ -148,31 +147,6 @@ clientKeyFile: /certs/client.key
148147
149148
For detailed configuration options for the gRPC driver, refer to the [gRPC driver options package](https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/grpc/options.go#L30-L40).
150149
151-
### Kafka Protocol/Driver
152-
153-
Kafka Protocol/Drive is not enabled by default. To enable it, add the `-tags=kafka` flag before the build.
154-
155-
Here’s a sample configuration for Kafka in YAML:
156-
157-
```yaml
158-
bootstrapServer: kafka.example.com:9092
159-
caFile: /certs/ca.crt
160-
clientCertFile: /certs/client.crt
161-
clientKeyFile: /certs/client.key
162-
```
163-
164-
For detailed configuration options for the Kafka driver, refer to the [Kafka driver options package](./generic/options/kafka/options.go). You can also add advanced configurations supported by librdkafka. For instance, to set the maximum Kafka protocol request message size to 200,000 bytes, use the following configuration in YAML:
165-
166-
```yaml
167-
bootstrapServer: kafka.example.com:9092
168-
caFile: /certs/ca.crt
169-
clientCertFile: /certs/client.crt
170-
clientKeyFile: /certs/client.key
171-
message.copy.max.bytes: 200000
172-
```
173-
174-
For the complete list of supported configurations, refer to the [librdkafka documentation](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md).
175-
176150
## Work Clients
177151
178152
### Building a ManifestWorkSourceClient on the hub cluster with SourceLocalWatcherStore

pkg/cloudevents/clients/options/generic.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ type GenericClientOptions[T generic.ResourceObject] struct {
3131
//
3232
// GRPCOptions (*grpc.GRPCOptions): builds a generic cloudevents client with GRPC
3333
//
34-
// KafkaOptions (*kafka.KafkaOptions): builds a generic cloudevents client with Kafka
35-
//
3634
// - codec, the codec for resource
3735
//
3836
// - clientID, the client ID for generic cloudevents client.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package constants
22

33
const (
4-
ConfigTypeMQTT = "mqtt"
5-
ConfigTypeGRPC = "grpc"
6-
ConfigTypeKafka = "kafka"
4+
ConfigTypeMQTT = "mqtt"
5+
ConfigTypeGRPC = "grpc"
76
)

pkg/cloudevents/doc/design.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The [`CloudEventsOptions`](../generic/options/options.go) interface defines an o
1616
For each event protocol, it needs to implement the `CloudEventsSourceOptions` and `CloudEventsAgentOptions`, the
1717
`CloudEventsSourceOptions` will be used for building cloudevents source client and the `CloudEventsAgentOptions` will be used for building cloudevents agent client.
1818

19-
Currently, the MQTT, Kafka and gRPC are implemented.
19+
Currently, the MQTT and gRPC are implemented.
2020

2121
```mermaid
2222
classDiagram
@@ -42,9 +42,6 @@ CloudEventsOptions <|-- CloudEventsAgentOptions
4242
CloudEventsSourceOptions <|.. mqttSourceOptions
4343
CloudEventsAgentOptions <|.. mqttAgentOptions
4444
45-
CloudEventsSourceOptions <|.. kafkaSourceOptions
46-
CloudEventsAgentOptions <|.. kafkaAgentOptions
47-
4845
CloudEventsSourceOptions <|.. grpcSourceOptions
4946
CloudEventsAgentOptions <|.. grpcAgentOptions
5047
```

pkg/cloudevents/generic/options/kafka/agentoptions.go

Lines changed: 0 additions & 65 deletions
This file was deleted.

pkg/cloudevents/generic/options/kafka/options.go

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)