package ticdc

import (
	"context"

	"sigs.k8s.io/controller-runtime/pkg/client"

	"github.com/tidbcloud/infra-api/controllers/reconciler"
)

type GardenerTiCDCCluster struct {
	ticdcCluster
}

func BuildGardenerTiCDCCluster(cls ticdcCluster) *GardenerTiCDCCluster {
	return &GardenerTiCDCCluster{
		ticdcCluster: cls,
	}
}

func (ticdc *GardenerTiCDCCluster) Observe(ctx context.Context, obj client.Object) (reconciler.ExternalObservation, error) {
	return ticdc.ticdcCluster.Observe(ctx, obj)
}

func (ticdc *GardenerTiCDCCluster) Create(ctx context.Context, obj client.Object) error {
	return ticdc.ticdcCluster.Create(ctx, obj)
}

func (ticdc *GardenerTiCDCCluster) Update(ctx context.Context, obj client.Object) error {
	return ticdc.ticdcCluster.Update(ctx, obj)
}

func (ticdc *GardenerTiCDCCluster) Delete(ctx context.Context, obj client.Object) (reconciler.ExternalDeletion, error) {
	return ticdc.ticdcCluster.Delete(ctx, obj)
}
