Example #1
0
func (tca *TCA) startTCAP(wg *sync.WaitGroup, opts []grpc.ServerOption) {
	var err error

	tca.sockp, err = net.Listen("tcp", viper.GetString("ports.tcaP"))
	if err != nil {
		Panic.Panicln(err)
	}

	tca.srvp = grpc.NewServer(opts...)
	pb.RegisterTCAPServer(tca.srvp, &TCAP{tca})
	tca.srvp.Serve(tca.sockp)

	_ = tca.sockp.Close()
	wg.Done()
}
Example #2
0
func (tca *TCA) startTCAP(srv *grpc.Server) {
	pb.RegisterTCAPServer(srv, &TCAP{tca})
}