MCPcopy Create free account
hub / github.com/deepflowio/deepflow / getConn

Function getConn

cli/ctl/ingester_check.go:169–183  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

167}
168
169func getConn(cmd *cobra.Command) *grpc.ClientConn {
170 server := common.GetServerInfo(cmd)
171 orgID := common.GetORGID(cmd)
172 paramData.RpcIP = server.IP
173 paramData.RpcPort = strconv.Itoa(int(server.RpcPort))
174 paramData.OrgID = uint32(orgID)
175 addr := net.JoinHostPort(paramData.RpcIP, paramData.RpcPort)
176 conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithMaxMsgSize(1024*1024*200))
177 if err != nil {
178 fmt.Println(err)
179 return nil
180 }
181
182 return conn
183}
184
185func initCmd(cmd *cobra.Command, cmds []CmdExecute) {
186 conn := getConn(cmd)

Callers 4

prometheusCacheFunction · 0.85
initCmdFunction · 0.85
universalTagNameFunction · 0.85
orgIDsFunction · 0.85

Calls 1

GetORGIDMethod · 0.45

Tested by

no test coverage detected