Skip to content

Commit

Permalink
update doc and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sewenew committed Jun 13, 2022
1 parent 9210288 commit c3329b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,23 +298,23 @@ If you are using Python, you can use [redis-py](https://github.com/andymccurdy/r
>>> import redis
>>> r = redis.StrictRedis(host='localhost', port=6379, db=0)
>>> r.execute_command('PB.SET', 'key', 'Msg', '{"i" : 1, "sub" : {"s" : "string", "i" : 2}, "arr" : [1, 2, 3]}')
1L
>>> r.execute_command('PB.GET', 'key', 'Msg')
'\x08\x01\x12\n\n\x06string\x10\x02\x1a\x03\x01\x02\x03'
1
>>> r.execute_command('PB.GET', 'key', '--FORMAT', 'BINARY', 'Msg')
b'\x08\x01\x12\n\n\x06string\x10\x02\x1a\x03\x01\x02\x03'
>>> r.execute_command('PB.GET', 'key', '--FORMAT', 'JSON', 'Msg')
'{"i":1,"sub":{"s":"string","i":2},"arr":[1,2,3]}'
b'{"i":1,"sub":{"s":"string","i":2},"arr":[1,2,3]}'
>>> r.execute_command('PB.SET', 'key', 'Msg', '/i', 2)
1L
1
>>> r.execute_command('PB.GET', 'key', 'Msg', '/i')
2L
2
>>> r.execute_command('PB.SET', 'key', 'Msg', '/sub/s', 'redis-protobuf')
1L
1
>>> r.execute_command('PB.GET', 'key', 'Msg', '/sub/s')
'redis-protobuf'
b'redis-protobuf'
>>> r.execute_command('PB.SET', 'key', 'Msg', '/arr/0', 100)
1L
1
>>> r.execute_command('PB.GET', 'key', 'Msg', '/arr/0')
100L
100
```

## Commands
Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ RUN set -ex;\
mkdir -p "$REDISDIR/proto/google/protobuf" "$REDISDIR/proto/google/protobuf/util" "$REDISDIR/proto/google/protobuf/compiler" "$REDISDIR/modules" "$REDISDIR/conf";\
cp /usr/src/redis-protobuf-master/docker/example.proto "$REDISDIR/proto";\
cp /usr/src/protobuf-3.8.0-map-reflection/src/google/protobuf/*.proto "$REDISDIR/proto/google/protobuf";\
cp /usr/src/protobuf-3.8.0-map-reflection/src/google/protobuf/util/*.proto "$REDISDIR/proto/google/protobuf/util";\
cp /usr/src/protobuf-3.8.0-map-reflection/src/google/protobuf/compiler/*.proto "$REDISDIR/proto/google/protobuf/compiler";\
cp /usr/src/redis-protobuf-master/compile/libredis-protobuf.so "$REDISDIR/modules";\
echo 'loadmodule /usr/lib/redis/modules/libredis-protobuf.so --dir /usr/lib/redis/proto' > "$REDISDIR/conf/redis.conf";

Expand Down

0 comments on commit c3329b5

Please sign in to comment.