1 #ifndef MEMCACHED_MOCK_SERVER_H
2 #define MEMCACHED_MOCK_SERVER_H
4 #include <memcached/engine.h>
18 ENGINE_ERROR_CODE status;
21 bool handle_ewouldblock;
22 pthread_mutex_t mutex;
38 MEMCACHED_PUBLIC_API
void init_mock_server(
ENGINE_HANDLE *server_engine);
44 MEMCACHED_PUBLIC_API
const void *create_mock_cookie(
void);
46 MEMCACHED_PUBLIC_API
void destroy_mock_cookie(
const void *cookie);
48 MEMCACHED_PUBLIC_API
void mock_set_ewouldblock_handling(
const void *cookie,
bool enable);
50 MEMCACHED_PUBLIC_API
void lock_mock_cookie(
const void *cookie);
52 MEMCACHED_PUBLIC_API
void unlock_mock_cookie(
const void *cookie);
54 MEMCACHED_PUBLIC_API
void waitfor_mock_cookie(
const void *cookie);
56 MEMCACHED_PUBLIC_API
void mock_time_travel(
int by);
58 MEMCACHED_PUBLIC_API
void disconnect_mock_connection(
struct mock_connstruct *c);
60 MEMCACHED_PUBLIC_API
void disconnect_all_mock_connections(
struct mock_connstruct *c);
62 MEMCACHED_PUBLIC_API
void destroy_mock_event_callbacks_rec(
struct mock_callbacks *h);
64 MEMCACHED_PUBLIC_API
void destroy_mock_event_callbacks(
void);