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 ¶
- type KafkaClient
- func (kc *KafkaClient) CreateTopic(ctx context.Context, topic *kafka.Topic, numPartition int, repFactor int) error
- func (kc *KafkaClient) DeleteTopic(ctx context.Context, topic *kafka.Topic) error
- func (kc *KafkaClient) EnableHealthinessChannel(ctx context.Context, enable bool) chan bool
- func (kc *KafkaClient) EnableLivenessChannel(ctx context.Context, enable bool) chan bool
- func (kc *KafkaClient) ListTopics(ctx context.Context) ([]string, error)
- func (kc *KafkaClient) Send(ctx context.Context, msg interface{}, topic *kafka.Topic, keys ...string) error
- func (kc *KafkaClient) SendLiveness(ctx context.Context) error
- func (kc *KafkaClient) Start(ctx context.Context) error
- func (kc *KafkaClient) Stop(ctx context.Context)
- func (kc *KafkaClient) Subscribe(ctx context.Context, topic *kafka.Topic, kvArgs ...*kafka.KVArg) (<-chan proto.Message, error)
- func (kc *KafkaClient) SubscribeForMetadata(ctx context.Context, _ func(fromTopic string, timestamp time.Time))
- func (kc *KafkaClient) UnSubscribe(ctx context.Context, topic *kafka.Topic, ch <-chan proto.Message) error
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 (*KafkaClient) DeleteTopic ¶
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) SendLiveness ¶
func (kc *KafkaClient) SendLiveness(ctx context.Context) error
func (*KafkaClient) Stop ¶
func (kc *KafkaClient) Stop(ctx context.Context)
func (*KafkaClient) SubscribeForMetadata ¶
func (*KafkaClient) UnSubscribe ¶
Click to show internal directories.
Click to hide internal directories.