add the cache service (#112)

This commit is contained in:
Asim Aslam
2021-05-19 13:55:34 +01:00
committed by GitHub
parent f3ca93b789
commit d51582ce77
11 changed files with 1319 additions and 0 deletions

25
cache/main.go vendored Normal file
View File

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