func main() {
	log, err := logger.New(serviceName, logger.Options{
		Format:     logger.SyslogLogFormat,
		DebugLevel: isDebug(),
	})
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	err = os.Setenv("KUBECONFIG", path.Join(
		config.KubeConfig[configprovider.FilePath],
		fmt.Sprintf("%s.%s", config.KubeConfig[configprovider.FileName], config.KubeConfig[configprovider.FileType])),
	)
	if err != nil {
		log.Warn(err)
	}
	cfg, err := config.New(configprovider.InMemKey)
	if err != nil {
		log.Error(err)
		os.Exit(1)
	}
	service := &grpc.Service{}
	err = cfg.GetObject(adapter.ServerKey, service)
	if err != nil {
		log.Error(err)
		os.Exit(1)
	}
	kubeconfigHandler, err := config.NewKubeconfigBuilder(configprovider.ViperKey)
	if err != nil {
		log.Error(err)
		os.Exit(1)
	}
	handler := appmesh.New(cfg, log, kubeconfigHandler)
	handler = adapter.AddLogger(log, handler)
	service.Handler = handler
	service.Channel = make(chan interface{}, 10)
	service.StartedAt = time.Now()
	service.Version = version
	service.GitSHA = gitsha
	go registerCapabilities(service.Port, log)         
	go registerDynamicCapabilities(service.Port, log)  
	log.Info("Adaptor Listening at port: ", service.Port)
	err = grpc.Start(service, nil)
	if err != nil {
		log.Error(err)
		os.Exit(1)
	}
}
main is the entrypoint of the adaptor
package main
import (
	"fmt"
	"os"
	"path"
	"strings"
	"time"
	"github.com/layer5io/meshery-adapter-library/adapter"
	"github.com/layer5io/meshery-adapter-library/api/grpc"
	configprovider "github.com/layer5io/meshery-adapter-library/config/provider"
	"github.com/layer5io/meshery-app-mesh/appmesh"
	"github.com/layer5io/meshery-app-mesh/internal/config"
	"github.com/layer5io/meshkit/logger"
	"github.com/layer5io/meshkit/utils/manifests"
	"github.com/layer5io/meshery-app-mesh/appmesh/oam"
	smp "github.com/layer5io/service-mesh-performance/spec"
)
var (
	serviceName = "app-mesh-adapter"
	version     = "none"
	gitsha      = "none"
)
func isDebug() bool {
	return os.Getenv("DEBUG") == "true"
}
func init() {
	err := os.MkdirAll(path.Join(config.RootPath(), "bin"), 0750)
	if err != nil {
		fmt.Println(err)
		os.Exit(0)
	}
}