consumergroup

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KafkaSourceScheduler is the key for the scheduler map for any KafkaSource.
	// Keep this constant lowercase.
	KafkaSourceScheduler = "kafkasource"
	// KafkaTriggerScheduler is the key for the scheduler map for any Kafka Trigger.
	// Keep this constant lowercase.
	KafkaTriggerScheduler = "trigger"
	// KafkaChannelScheduler is the key for the scheduler map for any KafkaChannel.
	// Keep this constant lowercase.
	KafkaChannelScheduler = "kafkachannel"
)

Variables

View Source
var (
	ErrNoSubscriberURI     = errors.New("no subscriber URI resolved")
	ErrNoDeadLetterSinkURI = errors.New("no dead letter sink URI resolved")
)

Functions

func Enqueue added in v0.29.0

func Enqueue(userFacingResource string, enqueue func(key types.NamespacedName)) func(obj interface{})

Enqueue enqueues using the provided enqueue function the resource associated with a ConsumerGroup

func Filter added in v0.29.0

func Filter(userFacingResource string) func(obj interface{}) bool

Filter returns a filter function based on the user-facing resource that a controller is tracking. Usable by FilteringResourceEventHandler.

func NewController added in v0.29.0

func NewController(ctx context.Context) *controller.Impl

func ResyncOnStatefulSetChange added in v0.30.0

func ResyncOnStatefulSetChange(ctx context.Context, handle func(interface{}))

Types

type AuthSpecSecretLocator added in v0.31.0

type AuthSpecSecretLocator struct {
	*kafkainternals.ConsumerGroup
}

func (*AuthSpecSecretLocator) SecretName added in v0.31.0

func (sl *AuthSpecSecretLocator) SecretName() (string, bool)

func (*AuthSpecSecretLocator) SecretNamespace added in v0.31.0

func (sl *AuthSpecSecretLocator) SecretNamespace() (string, bool)

type ConsumersPerPlacement added in v0.29.0

type ConsumersPerPlacement struct {
	Placement *eventingduckv1alpha1.Placement
	Consumers []*kafkainternals.Consumer
}

type NetSpecSecretLocator added in v0.31.0

type NetSpecSecretLocator struct {
	*kafkainternals.ConsumerGroup
}

func (*NetSpecSecretLocator) SecretName added in v0.31.0

func (sl *NetSpecSecretLocator) SecretName() (string, bool)

func (*NetSpecSecretLocator) SecretNamespace added in v0.31.0

func (sl *NetSpecSecretLocator) SecretNamespace() (string, bool)

type Reconciler

type Reconciler struct {
	SchedulerFunc   schedulerFunc
	ConsumerLister  kafkainternalslisters.ConsumerLister
	InternalsClient internalv1alpha1.InternalV1alpha1Interface
	SecretLister    corelisters.SecretLister
	KubeClient      kubernetes.Interface

	NameGenerator names.NameGenerator

	// NewKafkaClient creates new sarama Client. It's convenient to add this as Reconciler field so that we can
	// mock the function used during the reconciliation loop.
	NewKafkaClient kafka.NewClientFunc

	// InitOffsetsFunc initialize offsets for a provided set of topics and a provided consumer group id.
	// It's convenient to add this as Reconciler field so that we can mock the function used during the
	// reconciliation loop.
	InitOffsetsFunc kafka.InitOffsetsFunc

	SystemNamespace string
	// NewKafkaClusterAdminClient creates new sarama ClusterAdmin. It's convenient to add this as Reconciler field so that we can
	// mock the function used during the reconciliation loop.
	NewKafkaClusterAdminClient kafka.NewClusterAdminClientFunc
}

func (Reconciler) FinalizeKind added in v0.32.0

func (Reconciler) ReconcileKind

type SchedulerConfig added in v0.29.0

type SchedulerConfig struct {
	StatefulSetName   string
	RefreshPeriod     time.Duration
	Capacity          int32
	SchedulerPolicy   *scheduler.SchedulerPolicy
	DeSchedulerPolicy *scheduler.SchedulerPolicy
}

Jump to

Keyboard shortcuts

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