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

Method Exists

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

Source from the content-addressed store, hash-verified

255}
256
257func (c *Client) Exists(key string) (bool, error) {
258 client, err := newGrpcClient(c.Addr)
259 if err != nil {
260 return false, nil
261 }
262 resp, err := client.Exists(context.Background(), &gstring.ExistsRequest{Key: key})
263 if err != nil {
264 return false, nil
265 }
266 return resp.Exists, nil
267}
268
269func (c *Client) Expire(key string, ttl int64) error {
270 client, err := newGrpcClient(c.Addr)

Callers

nothing calls this directly

Calls 2

newGrpcClientFunction · 0.85
ExistsMethod · 0.65

Tested by

no test coverage detected