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

Method StrLen

engine/grpc/client/string.go:91–101  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

89}
90
91func (c *Client) StrLen(key string) (int32, error) {
92 client, err := newGrpcClient(c.Addr)
93 if err != nil {
94 return 0, nil
95 }
96 resp, err := client.StrLen(context.Background(), &gstring.StrLenRequest{Key: key})
97 if err != nil {
98 return 0, err
99 }
100 return resp.Length, nil
101}
102
103func (c *Client) Type(key string) (string, error) {
104 client, err := newGrpcClient(c.Addr)

Callers

nothing calls this directly

Calls 2

newGrpcClientFunction · 0.85
StrLenMethod · 0.65

Tested by

no test coverage detected