git-hulk commented on PR #95:
URL: 
https://github.com/apache/incubator-kvrocks-website/pull/95#issuecomment-1528780435

   @Winterspringkle Can use below client code samples:
   
   Java:
   
   ```java
   package org.example;
   import redis.clients.jedis.Jedis;
   import redis.clients.jedis.JedisPool;
   
   JedisPool pool = new JedisPool("127.0.0.1", 6666);
   
   try (Jedis jedis = pool.getResource()) {
        jedis.set("username", "kvrocks");
     System.out.println(jedis.get("username"));
   }
   ```
   
   Go
   
   ```go
   import (
        "context"
        "fmt"
        "github.com/redis/go-redis/v9"
   )
   
   client := redis.NewClient(&redis.Options{
        Addr:     "localhost:6666",
   })
   
   err := client.Set(ctx, "username", "kvrocks", 0).Err()
   if err != nil {
       panic(err)
   }
   
   val, err := client.Get(ctx, "username").Result()
   if err != nil {
       panic(err)
   }
   fmt.Println("username", val)
   ```
   
   Python
   
   ```python
   r = redis.Redis(host='localhost', port=6666, decode_responses=True)
   
   r.set('username', 'kvrocks')
   # True
   r.get('username')
   # kvrocks
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to