package changefeed

import "github.com/tidbcloud/dataflow-service-e2e/internal/model"

const (
	defaultRunningCheckRetry uint = 20
	gcpRunningCheckRetry     uint = 40
)

type kafkaSmokeInstanceProfile struct {
	changefeed1Initial   string
	changefeed1ScaleUp   string
	changefeed2Initial   string
	changefeed2ScaleDown string
}

func kafkaSmokeInstanceProfileForCloud(cloudProvider model.CloudProviderType) kafkaSmokeInstanceProfile {
	profile := kafkaSmokeInstanceProfile{
		changefeed1Initial:   "2rcu",
		changefeed1ScaleUp:   "4rcu",
		changefeed2Initial:   "8rcu",
		changefeed2ScaleDown: "4rcu",
	}
	if cloudProvider == model.GCP {
		profile.changefeed2Initial = "4rcu"
		profile.changefeed2ScaleDown = "2rcu"
	}
	return profile
}

func runningCheckRetryForCloud(cloudProvider model.CloudProviderType) uint {
	if cloudProvider == model.GCP {
		return gcpRunningCheckRetry
	}
	return defaultRunningCheckRetry
}
