rts-sim-testing-service/grpcproto/client.go

18 lines
301 B
Go
Raw Normal View History

package apiproto
import grpc "google.golang.org/grpc"
var client CentrifugoApiClient
func InitClient() {
conn, err := grpc.Dial("192.168.3.158:10000", grpc.WithInsecure())
if err != nil {
panic(err)
}
client = NewCentrifugoApiClient(conn)
}
func Cli() CentrifugoApiClient {
return client
}