RedisGraph / redisgraph-go

A Golang client for redisgraph
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
132 stars 38 forks source link

Extended client with examples folder and godoc with 3 examples … #26

Closed filipecosta90 closed 4 years ago

filipecosta90 commented 4 years ago

Extended the client with examples folder and godoc with 3 examples on how to connect to the RedisGraph Server. ( simplest way possible, with pool, and with SSL ) The examples (with exception to tls ) are part of the tests ( via the Output: ... directive ). Here is the aspect of it: image Regarding tls support it is also included as pluggable example given that it's more complex and users can get the example working on their system very quickly. ( we're making it have the same look and feel across all modules ). Regarding testing of the tls examples (lets wait a bit for the redisgraph:edge to be able to support it --matter of days ) given that the docker images requires openmp and other dependencies and hacking around it is more difficult than on other modules. To test tls example locally:

redis-server --tls-port 6380 --port 6379 --tls-cert-file <path_to>/redis.crt --tls-key-file <path_to>/redis.key  --tls-ca-cert-file <path_to>/ca.crt   --loadmodule <path_to>/redisgraph.so

then on the go client:

$> TLS_CERT=<path_to>/redis.crt TLS_KEY=<path_to>/redis.key TLS_CACERT=/<path_to>/ca.crt REDISGRAPH_TEST_HOST=127.0.0.1:6380 make examples
go get -t -v ./...

Building the examples...
go build ./examples/redisgraph_tls_client/.
./redisgraph_tls_client --tls-cert-file <path_to>/redis.crt \
                                         --tls-key-file <path_to>/redis.key \
                                         --tls-ca-cert-file <path_to>/ca.crt \
                                         --host 127.0.0.1:6380
WorkPlace
filipecosta90 commented 4 years ago

@swilly22 I believe all comments were addressed. Can you review again?