Add the carbon api (#351)

This commit is contained in:
Asim Aslam
2022-01-07 11:55:41 +00:00
committed by GitHub
parent a093abaf5e
commit f505d4b857
15 changed files with 650 additions and 2 deletions

24
carbon/main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger"
"github.com/micro/services/carbon/handler"
pb "github.com/micro/services/carbon/proto"
)
func main() {
// Create service
srv := service.New(
service.Name("carbon"),
service.Version("latest"),
)
// Register handler
pb.RegisterCarbonHandler(srv.Server(), handler.New())
// Run service
if err := srv.Run(); err != nil {
logger.Fatal(err)
}
}