INNER CODE UNIT · Go

convertStrategyLegacyToIO

k8gb-io/k8gb · controllers/conversion_k8gbio.go:106

func convertStrategyLegacyToIO(strategy k8gbv1beta1.Strategy) k8gbv1beta1io.Strategy {
	return k8gbv1beta1io.Strategy{
		Type:                       strategy.Type,
		Weight:                     strategy.Weight,
		PrimaryGeoTag:              strategy.PrimaryGeoTag,
		DNSTtlSeconds:              strategy.DNSTtlSeconds,
		SplitBrainThresholdSeconds: strategy.SplitBrainThresholdSeconds,
	}
}

func convertResourceRefLegacyToIO(ref k8gbv1beta1.ResourceRef) k8gbv1beta1io.ResourceRef {
	return k8gbv1beta1io.ResourceRef{
		ObjectReference: ref.ObjectReference,
		LabelSelector:   ref.LabelSelector,
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…