034ebca873
Don't choke on nil replies from Redis.
2016-07-08 19:52:27 +01:00
1aacca9e21
Load save and delete scripts upon connection to Redis.
2016-07-08 16:08:21 +01:00
0e31aa7ea0
Update sample config with dummy Redis settings.
2016-07-08 15:22:31 +01:00
53f9e72172
Nest postgre settings into node "connection" for consistency with redis.
2016-07-08 15:20:49 +01:00
afae0b6d11
Load Lua script search paths into a SearchPaths.
2016-07-08 15:18:26 +01:00
cc943791ef
core should always be a .so
2016-07-08 15:17:13 +01:00
baddd228fa
find_plugin_by_name() now relies on the new SearchPaths class.
2016-07-08 14:50:51 +01:00
5f5b2b5770
New core library.
2016-07-08 14:49:40 +01:00
e728eb2a9e
Various really small changes.
2016-07-08 14:17:51 +01:00
fc4bec4e19
Import ohm-scripts from soveran's repo.
...
They will be used by the redis backend (not the redis wrapper).
2016-07-08 11:45:00 +01:00
0df8c5875c
Buildfix on gcc 5.4
2016-06-30 12:41:01 +01:00
14587f1cb8
Buildfix when not using cryptopp.
2016-06-30 11:40:05 +01:00
53bb4684b4
Allow disabling use of cryptopp from code.
...
Just comment out the definition of MAKE_SHA1_WITH_CRYPTOPP
and the code will fall back to getting the sha1 from Redis.
2016-06-30 11:37:05 +01:00
8d7d4c5555
Implement Script class.
2016-06-30 11:27:15 +01:00
0efd71a2fa
Refactor connection code.
...
Move all redis connection and libev code out from command.
Command just wraps some useful methods in AsyncConnection now.
2016-06-30 09:35:34 +01:00
cf9ac6b296
Add locking so async communication works correctly.
...
helgrind says it works. I think.
2016-06-29 22:51:45 +01:00
7f25fdb37c
Add support for 'status string' replies from Redis.
2016-06-29 22:49:38 +01:00
2e68e639bf
Support conversion to lower case hex.
2016-06-29 22:48:50 +01:00
40e189cf4d
Add on_connect/on_disconnect hiredis callbacks.
2016-06-21 17:52:13 +01:00
29e2375e3b
Add constructor for opening connection to socket.
2016-06-21 14:20:30 +01:00
c61619eb38
Add code to submit scripts to Redis.
...
This is untested, but I can't test it until I implement other
things first. I also need to do some refactoring, so I need to
commit and make a checkpoint now.
Consider this code as good as if didn't exist.
2016-06-21 14:19:59 +01:00
7957a94980
Move cmake_on_off.h to helpers dir.
2016-06-20 19:04:24 +01:00
e179a31616
Change CRYPTOPP case to CryptoPP as it seems to be the official convention.
...
Looking at this page https://cryptopp.com/wiki/CMake#Using_the_library_in_other_projects
it seems to me there should be or there is going to be a system-wide
official FindCryptoPP module. Those changes should match the case convention
from that page... somewhat. I'm not going to do the cryptopp-shared thing.
So *if* that official module will ever become available on mainstream distros,
and *if* they start using proper names, this file should just be deleted
and everything should keep on working just fine.
2016-06-20 18:56:31 +01:00
af0f18d5ff
Fix indentation so vim is happy.
2016-06-20 18:50:15 +01:00
8324527073
Import Findcryptopp.cmake.
...
See: https://github.com/ceph/ceph/blob/master/cmake/modules/Findcryptopp.cmake
2016-06-20 18:50:01 +01:00
92ef212e44
Use async hiredis API.
2016-06-20 18:19:06 +01:00
cdae333e1f
Don't throw if reply is of error type - just put it in Reply.
2016-06-20 18:06:26 +01:00
fd62bea152
Deploy releases when a tag is pushed.
...
Hopefully it will work, but I can't test it right now.
[ci skip]
2016-06-17 10:00:54 +01:00
fabca35b0a
Prefix cmake option DB_OWNER_NAME with DINDEXER_
2016-06-17 09:30:26 +01:00
a3f037d0c8
Add travis-ci config file and update readme
...
It should build gcc debug, gcc release if I did it right.
2016-06-16 22:39:59 +01:00
53a42fa7c0
Add bin tag to lexical_cast.
...
This also fixes a subtle bug: the size passed to MaxSizedArray in
int_to_string() was calculated on the max value of type F, but when
F was a signed type the max would only be for example 31 bits.
Conversion of negative numbers would then fail with an assertion.
2016-06-15 23:04:46 +01:00
691bdd1d1e
Use new custom lexical_cast instead of the one from boost.
2016-06-15 22:38:25 +01:00
f9387114bf
Implement handling of signed types and fix some build errors.
2016-06-15 20:48:05 +01:00
2c5030f929
Add dedicated tests for lexical_cast and fix failures I found.
2016-06-15 17:27:32 +01:00
7ae8b95599
Rename casts.hpp to lexical_cast.hpp
2016-06-15 15:05:25 +01:00
4b30fabbe4
New string_to_tiger function.
...
Comes with unit test that indirectly also tests the
previously added lexical_cast.
2016-06-15 14:57:52 +01:00
7db82f83d9
Add custom lexical_cast function that can handle hex values and string_ref.
...
Negative values are not supported.
2016-06-15 14:54:24 +01:00
9491f2eb47
Move sequence_bt and string_bt into helpers.
...
They are useful in the Redis backend and in helpers itself.
People wanting to use pq alone from this project will have to cope and
search for all the needed files.
2016-06-15 14:53:07 +01:00
874783e8da
Add support for the MATCH and COUNT options for the SCAN commands.
2016-06-14 19:11:13 +01:00
423effa6cb
Set client name in Redis to dindexer_v0.1.5
2016-06-14 19:10:10 +01:00
fc5e25e3de
Forgot to remove the [TOC] entry :<
2016-06-14 14:07:03 +01:00
c61dc4fd9c
Trim down lengthy stuff from the readme.
...
Make it more clear, more up-to-date and less verbose. Hopefully.
2016-06-14 14:06:04 +01:00
6a03afb938
Remove compiler check as it's breaking the build even on gcc.
2016-06-14 11:46:44 +01:00
53835d54b2
Also return content_type.
2016-06-14 11:07:59 +01:00
2a696aa62a
Allow users to selectively build backends.
...
Pass -DDINDEXER_ENABLED_BACKENDS="list,of,backends" to cmake to tell
which backends you want to be built. Currently available backends are
postgresql and redis. Default is postgresql.
Allowed strings in the comma separated list above are the names of the
directories in src/backends.
2016-06-14 11:03:31 +01:00
a5d5ee5af5
Also return content_type.
2016-06-14 10:41:38 +01:00
549ab7b16a
Write implementation for search_file_by_hash().
...
Note that the postgresql backend does something like
"select blah... where hash=$1 limit 1", so it only returns one match.
The SRANDMEMBER used in this implementation also returns one match,
but it's not deterministic I suppose.
2016-06-14 10:39:42 +01:00
9ef9b05014
Move variant types enum out of implem namespace.
...
Also assert that you can get the type you are trying to get before
actually trying.
2016-06-14 09:37:57 +01:00
ab43215f49
Use the right syntax for Redis command.
...
With this commit, scan subcommand can save all it needs into Redis.
2016-06-14 09:12:32 +01:00
ba8e8b9f7b
Add support for char[N] to the run() method.
2016-06-14 09:11:07 +01:00