add stream service (#188)

This commit is contained in:
Asim Aslam
2021-08-13 12:53:50 +01:00
committed by GitHub
parent 3c6c8f646e
commit 9348afd0f6
14 changed files with 749 additions and 1 deletions

24
stream/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/stream/handler"
pb "github.com/micro/services/stream/proto"
)
func main() {
// Create service
srv := service.New(
service.Name("stream"),
service.Version("latest"),
)
// Register handler
pb.RegisterStreamHandler(srv.Server(), new(handler.Stream))
// Run service
if err := srv.Run(); err != nil {
logger.Fatal(err)
}
}