dispatcher

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright 2021 The Knative Authors

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 ChannelConfig

type ChannelConfig struct {
	Namespace     string
	Name          string
	HostName      string
	Subscriptions []Subscription
}

func (ChannelConfig) SubscriptionsUIDs added in v0.20.3

func (cc ChannelConfig) SubscriptionsUIDs() []string

type KafkaDispatcher

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

func NewDispatcher

func NewDispatcher(ctx context.Context, args *KafkaDispatcherArgs, enqueue func(ref types.NamespacedName)) (*KafkaDispatcher, error)

NewDispatcher creates a new dispatcher struct. enqueue argument is a function that is used to requeue a KafkaChannel instance via the reconciler which is used when creating the consumer.

func (*KafkaDispatcher) CleanupChannel added in v0.20.3

func (d *KafkaDispatcher) CleanupChannel(name, namespace, hostname string) error

func (*KafkaDispatcher) ReconcileConsumers added in v0.20.3

func (d *KafkaDispatcher) ReconcileConsumers(ctx context.Context, config *ChannelConfig) error

ReconcileConsumers will be called by new CRD based kafka channel dispatcher controller.

func (*KafkaDispatcher) RegisterChannelHost added in v0.20.3

func (d *KafkaDispatcher) RegisterChannelHost(channelConfig *ChannelConfig) error

RegisterChannelHost adds a new channel to the host-channel mapping.

func (*KafkaDispatcher) Start

func (d *KafkaDispatcher) Start(ctx context.Context) error

Start starts the kafka dispatcher's message processing.

type KafkaDispatcherArgs

type KafkaDispatcherArgs struct {
	Brokers   []string
	Config    *config.EventingKafkaConfig
	TopicFunc TopicFunc
}

type KafkaSubscription added in v0.20.3

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

func NewKafkaSubscription added in v0.20.3

func NewKafkaSubscription(logger *zap.SugaredLogger) *KafkaSubscription

func (*KafkaSubscription) SetReady added in v0.20.3

func (ks *KafkaSubscription) SetReady(subID types.UID, partition int32, ready bool)

SetReady will mark the subid in the KafkaSubscription and call any registered callbacks

type Subscription

type Subscription struct {
	UID types.UID
	fanout.Subscription
}

func (Subscription) String

func (sub Subscription) String() string

type TopicFunc

type TopicFunc func(separator, namespace, name string) string

type UpdateError added in v0.20.3

type UpdateError map[types.UID]error

UpdateError is the error returned from the ReconcileConsumers method, with the details of which subscriptions failed to subscribe to.

func (UpdateError) Error added in v0.20.3

func (k UpdateError) Error() string

Jump to

Keyboard shortcuts

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