func ToMeshController(meshController *MeshControllerV1Alpha1) *MeshController {
	return &MeshController{
		MeshResource:        NewMeshResource(DefaultAPIVersion, meshController.Kind, meshController.Name),
		MeshControllerAdmin: meshController.MeshControllerAdmin,
	}
}
ToMeshController converts a MeshControllerV1Alpha1 resouce to a MeshController resource.
package resource
import (
	"fmt"
	"github.com/megaease/easemeshctl/cmd/client/command/printer"
	"github.com/megaease/easemeshctl/cmd/client/resource/meta"
)
type (
	MeshController struct {
		meta.MeshResource   `yaml:",inline"`
		MeshControllerAdmin `yaml:",inline"`
	}
	MeshControllerV1Alpha1 struct {
		Kind                string `yaml:"kind"`
		Name                string `yaml:"name"`
		MeshControllerAdmin `yaml:",inline"`
	}
	MeshControllerAdmin struct {
		HeartbeatInterval string `yaml:"heartbeatInterval" jsonschema:"required,format=duration"`
		RegistryType string `yaml:"registryType" jsonschema:"required"`
		APIPort int `yaml:"apiPort" jsonschema:"required"`
		IngressPort int `yaml:"ingressPort" jsonschema:"required"`
		ExternalServiceRegistry string `yaml:"externalServiceRegistry" jsonschema:"omitempty"`
	}
)
var _ printer.TableObject = &MeshController{}
func (mc *MeshController) Columns() []*printer.TableColumn {
	ports := fmt.Sprintf("%d/API,%d/Ingress", mc.APIPort, mc.IngressPort)
	return []*printer.TableColumn{
		{
			Name:  "Heartbeat",
			Value: mc.HeartbeatInterval,
		},
		{
			Name:  "Registry",
			Value: mc.RegistryType,
		},
		{
			Name:  "Ports",
			Value: ports,
		},
		{
			Name:  "ExternalRegistry",
			Value: mc.ExternalServiceRegistry,
		},
	}
}
func (mc *MeshController) ToV1Alpha1() *MeshControllerV1Alpha1 {
	return &MeshControllerV1Alpha1{
		Kind:                mc.Kind(),
		Name:                mc.Name(),
		MeshControllerAdmin: mc.MeshControllerAdmin,
	}
}