valkey-io/libvalkey

Rework tree structure and implement working Makefile

Closed this issue · 2 comments

Rework the project structure to be more idiomatic for a Linux library

General structure:

libvalkey/
├── Makefile
├── CMakeLists.txt
├── README.md
├── LICENSE
├── CHANGELOG.md
├── include/
│   └── valkey/
│       ├── adapters/
│       │   ├── libev.h
│       │   └── other-adapter.h
│       ├── valkey.h
│       └── other_public.h
├── src/
│   ├── valkey.c
│   ├── other_sources.c
│   ├── internal.h
│   └── another_internal.h
├── examples/
│   ├── blocking.c
│   └── async-libev.c
│   └── other-example.c
└── tests/
    ├── test.c
    └── other-tests.c

Also see #12 #14 #16

@bjosv @zuiderkwast If this structure seems generally reasonable to everyone I can clean the PR up a bit and get it merged.

I actually moved all of the libvalkeycluster .c test programs into tests/ locally and it was pretty simple to get most of them compiling. You guys have a more complex test structure though (with various shell scripts, etc), so I'll wait to move them in the PR.

LGTM.

We had cluster-specific adapters too before but I think @bjosv got rid of those, right?

other_public.h are these?

  • async.h
  • cluster.h? (cluster sync API)
  • cluster_async.h?

For the tests, we have some scripts, yes. We use a script that simulates a server and can be used for racy things and failure cases, like server dropping the connection, that are hard to reproduce consistently with a real running server. This tooling can be useful for non-cluster tests too, I believe.