Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClusterMetadata ¶
func BuildClusterMetadata(cluster *kafscalev1alpha1.KafscaleCluster, topics []kafscalev1alpha1.KafscaleTopic) metadata.ClusterMetadata
BuildClusterMetadata converts CRD state into the metadata snapshot consumed by brokers.
func PublishMetadataSnapshot ¶
func PublishMetadataSnapshot(ctx context.Context, endpoints []string, snapshot metadata.ClusterMetadata) error
PublishMetadataSnapshot writes the provided metadata snapshot into etcd so brokers can consume it.
Types ¶
type ClusterReconciler ¶
type ClusterReconciler struct {
Client client.Client
Scheme *runtime.Scheme
Publisher *SnapshotPublisher
}
ClusterReconciler reconciles KafscaleCluster resources into Deployments/Services.
func NewClusterReconciler ¶
func NewClusterReconciler(mgr ctrl.Manager, publisher *SnapshotPublisher) *ClusterReconciler
func (*ClusterReconciler) Reconcile ¶
Reconcile ensures broker workloads exist for every KafscaleCluster spec.
func (*ClusterReconciler) SetupWithManager ¶
func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
type EtcdResolution ¶
func EnsureEtcd ¶
func EnsureEtcd(ctx context.Context, c client.Client, scheme *runtime.Scheme, cluster *kafscalev1alpha1.KafscaleCluster) (EtcdResolution, error)
type SnapshotPublisher ¶
SnapshotPublisher translates KafscaleCluster/KafscaleTopic resources into the metadata snapshot read by brokers.
func NewSnapshotPublisher ¶
func NewSnapshotPublisher(c client.Client) *SnapshotPublisher
NewSnapshotPublisher creates a publisher backed by the provided controller-runtime client.
func (*SnapshotPublisher) Publish ¶
func (p *SnapshotPublisher) Publish(ctx context.Context, cluster *kafscalev1alpha1.KafscaleCluster, endpoints []string) error
Publish renders the current metadata for the cluster and puts it into etcd.
type TopicReconciler ¶
type TopicReconciler struct {
client.Client
Scheme *runtime.Scheme
Publisher *SnapshotPublisher
}
TopicReconciler ensures topic metadata is reflected in the etcd snapshot.
func NewTopicReconciler ¶
func NewTopicReconciler(mgr ctrl.Manager, publisher *SnapshotPublisher) *TopicReconciler
func (*TopicReconciler) SetupWithManager ¶
func (r *TopicReconciler) SetupWithManager(mgr ctrl.Manager) error