server.go 429 B

12345678910111213141516171819
  1. // Package server generate by warden_gen
  2. package server
  3. import (
  4. pb "go-common/app/service/main/coin/api"
  5. "go-common/app/service/main/coin/service"
  6. "go-common/library/net/rpc/warden"
  7. )
  8. // New Coin warden rpc server
  9. func New(c *warden.ServerConfig, svr *service.Service) *warden.Server {
  10. ws := warden.NewServer(c)
  11. pb.RegisterCoinServer(ws.Server(), svr)
  12. ws, err := ws.Start()
  13. if err != nil {
  14. panic(err)
  15. }
  16. return ws
  17. }