func New(provider string) (h config.Handler, err error) {
	switch provider {
	case configprovider.ViperKey:
		h, err = configprovider.NewViper(Config)
		if err != nil {
			return nil, err
		}
	case configprovider.InMemKey:
		h, err = configprovider.NewInMem(Config)
		if err != nil {
			return nil, err
		}
	default:
		return nil, ErrEmptyConfig
	}
	if err := h.SetObject(adapter.ServerKey, ServerConfig); err != nil {
		return nil, err
	}
	if err := h.SetObject(adapter.MeshSpecKey, MeshSpec); err != nil {
		return nil, err
	}
	if err := h.SetObject(adapter.OperationsKey, Operations); err != nil {
		return nil, err
	}
	return h, nil
}
New creates a new config instance
package config
import (
	"path"
	"strings"
	"github.com/layer5io/meshery-adapter-library/adapter"
	"github.com/layer5io/meshery-adapter-library/common"
	"github.com/layer5io/meshery-adapter-library/config"
	"github.com/layer5io/meshery-adapter-library/status"
	configprovider "github.com/layer5io/meshkit/config/provider"
	"github.com/layer5io/meshkit/utils"
	smp "github.com/layer5io/service-mesh-performance/spec"
)
const (
	Development = "development"
	Production  = "production"
	AnnotateNamespace = "annotate-namespace"
	OAMAdapterNameMetadataKey       = "adapter.meshery.io/name"
	OAMComponentCategoryMetadataKey = "ui.meshery.io/category"
)
var (
	LinkerdOperation = strings.ToLower(smp.ServiceMesh_LINKERD.Enum().String())
	configRootPath = path.Join(utils.GetHome(), ".meshery")
	Config = configprovider.Options{
		FilePath: configRootPath,
		FileName: "linkerd",
		FileType: "yaml",
	}
	ServerConfig = map[string]string{
		"name":     smp.ServiceMesh_LINKERD.Enum().String(),
		"port":     "10001",
		"type":     "adapter",
		"traceurl": status.None,
	}
	MeshSpec = map[string]string{
		"name":    smp.ServiceMesh_LINKERD.Enum().String(),
		"status":  status.NotInstalled,
		"version": status.None,
	}
	ProviderConfig = map[string]string{
		configprovider.FilePath: configRootPath,
		configprovider.FileType: "yaml",
		configprovider.FileName: "linkerd",
	}
	KubeConfig = map[string]string{
		configprovider.FilePath: configRootPath,
		configprovider.FileType: "yaml",
		configprovider.FileName: "kubeconfig",
	}
	Operations = getOperations(common.Operations)
)