replace db with store in function (#318)

* replace db with store in function

* .

* set id properly

* .
This commit is contained in:
Asim Aslam
2021-12-10 15:51:34 +00:00
committed by GitHub
parent f022c62a87
commit 855fd8f72a
5 changed files with 491 additions and 138 deletions

View File

@@ -1,12 +1,10 @@
package main
import (
db "github.com/micro/services/db/proto"
"github.com/micro/services/function/handler"
pb "github.com/micro/services/function/proto"
"github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger"
"github.com/micro/services/function/handler"
pb "github.com/micro/services/function/proto"
)
func main() {
@@ -17,7 +15,7 @@ func main() {
)
// Register handler
pb.RegisterFunctionHandler(srv.Server(), handler.NewFunction(db.NewDbService("db", srv.Client())))
pb.RegisterFunctionHandler(srv.Server(), handler.NewFunction())
// Run service
if err := srv.Run(); err != nil {