You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

hpcac.go 969 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package main
  2. import (
  3. "flag"
  4. "fmt"
  5. "PCM/adaptor/PCM-HPC/PCM-AC/rpc/hpcAC"
  6. "PCM/adaptor/PCM-HPC/PCM-AC/rpc/internal/config"
  7. "PCM/adaptor/PCM-HPC/PCM-AC/rpc/internal/server"
  8. "PCM/adaptor/PCM-HPC/PCM-AC/rpc/internal/svc"
  9. "github.com/zeromicro/go-zero/core/conf"
  10. "github.com/zeromicro/go-zero/core/service"
  11. "github.com/zeromicro/go-zero/zrpc"
  12. "google.golang.org/grpc"
  13. "google.golang.org/grpc/reflection"
  14. )
  15. var configFile = flag.String("f", "adaptor/PCM-HPC/PCM-AC/rpc/etc/hpcac.yaml", "the config file")
  16. func main() {
  17. flag.Parse()
  18. var c config.Config
  19. conf.MustLoad(*configFile, &c)
  20. ctx := svc.NewServiceContext(c)
  21. s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
  22. hpcAC.RegisterHpcACServer(grpcServer, server.NewHpcACServer(ctx))
  23. if c.Mode == service.DevMode || c.Mode == service.TestMode {
  24. reflection.Register(grpcServer)
  25. }
  26. })
  27. defer s.Stop()
  28. fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
  29. s.Start()
  30. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.