18 lines
301 B
Go
18 lines
301 B
Go
|
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
|
||
|
}
|