package feature_gate

const (
	SelfSignedIssuer    = "self-signed-issuer"
	BizChangefeed       = "biz-changefeed"
	MultiTiCDCClusters  = "multi-ticdc-clusters"
	RegionalPrivateLink = "regional-private-link"
	// BizChangefeedBlacklist is the cdc 3-layer blacklist, it has the highest priority
	BizChangefeedBlacklist = "biz-changefeed-blacklist"
	BR3Layer               = "br-3-layer"
	// CompactLogBackupBlacklist is used to explicitly disable compact log backup feature (which is enabled by default)
	CompactLogBackupBlacklist = "compact-log-backup-blacklist"
	// CompactLogBackup is used to enable compact log backup feature (disabled by default)
	CompactLogBackup = "compact-log-backup"
	// TiCDCNewKernelAllowlist is kept for config compatibility; new kernel rollout no longer depends on it.
	TiCDCNewKernelAllowlist = "ticdc-new-kernel-allowlist"
	// TiCDCNewKernelBlacklist opts matched clusters out of the default new kernel path.
	TiCDCNewKernelBlacklist = "ticdc-new-kernel-blacklist"
)

type FeatureGate interface {
	QueryEnabledFeatures(req *QueryFeatureGateReq) QueryFeatureGateResp
	IsFeatureEnabled(req *QueryFeatureGateReq, feature string) bool
}

type QueryFeatureGateReq struct {
	TenantID      uint64
	ProjectID     uint64
	ClusterID     uint64
	Region        string // e.g. "ap-northeast-1", "us-west1", "eastus2"
	InfraProvider string // e.g. eks, gke, aks
}

type QueryFeatureGateResp struct {
	Features []string
}
