dispatcher

package
v0.0.0-...-87f0ce8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

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

func (cc ChannelConfig) SubscriptionsUIDs() []string

type KafkaDispatcher

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

func NewDispatcher

func NewDispatcher(ctx context.Context, args *KafkaDispatcherArgs) (*KafkaDispatcher, error)

func (*KafkaDispatcher) CleanupChannel

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

func (*KafkaDispatcher) ReconcileConsumers

func (d *KafkaDispatcher) ReconcileConsumers(config *ChannelConfig) error

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

func (*KafkaDispatcher) RegisterChannelHost

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 {
	KnCEConnectionArgs *kncloudevents.ConnectionArgs
	ClientID           string
	Brokers            []string
	KafkaConfig        *sarama.Config
	TopicFunc          TopicFunc
}

type KafkaSubscription

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

func NewKafkaSubscription

func NewKafkaSubscription(logger *zap.SugaredLogger) *KafkaSubscription

func (*KafkaSubscription) SetReady

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() string

type UpdateError

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

func (k UpdateError) Error() string

Jump to

Keyboard shortcuts

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