package crrf

import (
	"context"

	"github.com/tidbcloud/dataflow-service/app/models/domain"
	"github.com/tidbcloud/pkgv2/bizerr"
)

// CRRFModel handles Cross-Region Replication based Failover business logic.
type CRRFModel interface {
	// EnableCRRF starts the CRRF enable workflow for the given cluster.
	EnableCRRF(ctx context.Context, req *domain.EnableCRRFReq) bizerr.BizError
	// QueryCRRF returns the current CRRF status and checkpoint info for the cluster.
	QueryCRRF(ctx context.Context, clusterID uint64) (*domain.CRRFInfo, bizerr.BizError)
	// DisableCRRF starts the CRRF disable workflow for the given cluster.
	DisableCRRF(ctx context.Context, req *domain.DisableCRRFReq) bizerr.BizError
}
