kafka

package
v7.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

  • Copyright 2019-2024 Open Networking Foundation (ONF) and the ONF Contributors *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

* Copyright 2019-2024 Open Networking Foundation (ONF) and the ONF Contributors

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at

* http://www.apache.org/licenses/LICENSE-2.0

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaClient

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

func NewKafkaClient

func NewKafkaClient() *KafkaClient

func (*KafkaClient) CreateTopic

func (kc *KafkaClient) CreateTopic(ctx context.Context, topic *kafka.Topic, numPartition int, repFactor int) error

func (*KafkaClient) DeleteTopic

func (kc *KafkaClient) DeleteTopic(ctx context.Context, topic *kafka.Topic) error

func (*KafkaClient) EnableHealthinessChannel

func (kc *KafkaClient) EnableHealthinessChannel(ctx context.Context, enable bool) chan bool

func (*KafkaClient) EnableLivenessChannel

func (kc *KafkaClient) EnableLivenessChannel(ctx context.Context, enable bool) chan bool

func (*KafkaClient) ListTopics

func (kc *KafkaClient) ListTopics(ctx context.Context) ([]string, error)

func (*KafkaClient) Send

func (kc *KafkaClient) Send(ctx context.Context, msg interface{}, topic *kafka.Topic, keys ...string) error

func (*KafkaClient) SendLiveness

func (kc *KafkaClient) SendLiveness(ctx context.Context) error

func (*KafkaClient) Start

func (kc *KafkaClient) Start(ctx context.Context) error

func (*KafkaClient) Stop

func (kc *KafkaClient) Stop(ctx context.Context)

func (*KafkaClient) Subscribe

func (kc *KafkaClient) Subscribe(ctx context.Context, topic *kafka.Topic, kvArgs ...*kafka.KVArg) (<-chan proto.Message, error)

func (*KafkaClient) SubscribeForMetadata

func (kc *KafkaClient) SubscribeForMetadata(ctx context.Context, _ func(fromTopic string, timestamp time.Time))

func (*KafkaClient) UnSubscribe

func (kc *KafkaClient) UnSubscribe(ctx context.Context, topic *kafka.Topic, ch <-chan proto.Message) error

Jump to

Keyboard shortcuts

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