MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / newGrpcClient

Function newGrpcClient

engine/grpc/client/client.go:18–25  ·  view source on GitHub ↗

newGrpcClient returns a grpc client

(addr string)

Source from the content-addressed store, hash-verified

16
17// newGrpcClient returns a grpc client
18func newGrpcClient(addr string) (gstring.GStringServiceClient, error) {
19 conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
20 if err != nil {
21 return nil, err
22 }
23 client := gstring.NewGStringServiceClient(conn)
24 return client, nil
25}
26
27func newHashGrpcClient(addr string) (ghash.GHashServiceClient, error) {
28 conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))

Callers 15

PutMethod · 0.85
GetMethod · 0.85
DelMethod · 0.85
StrLenMethod · 0.85
TypeMethod · 0.85
AppendMethod · 0.85
GetSetMethod · 0.85
IncrMethod · 0.85
IncrByMethod · 0.85
IncrByFloatMethod · 0.85
DecrMethod · 0.85
DecrByMethod · 0.85

Calls 1

NewGStringServiceClientFunction · 0.92

Tested by

no test coverage detected