summaryrefslogtreecommitdiffstats
path: root/src/indexer/worker-pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/indexer/worker-pool.h')
-rw-r--r--src/indexer/worker-pool.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/indexer/worker-pool.h b/src/indexer/worker-pool.h
new file mode 100644
index 0000000..bf739bb
--- /dev/null
+++ b/src/indexer/worker-pool.h
@@ -0,0 +1,23 @@
+#ifndef WORKER_POOL_H
+#define WORKER_POOL_H
+
+#include "indexer.h"
+#include "worker-connection.h"
+
+struct connection;
+
+struct worker_pool *
+worker_pool_init(const char *socket_path, indexer_status_callback_t *callback,
+ worker_available_callback_t *avail_callback);
+void worker_pool_deinit(struct worker_pool **pool);
+
+bool worker_pool_have_connections(struct worker_pool *pool);
+
+bool worker_pool_get_connection(struct worker_pool *pool,
+ struct connection **conn_r);
+
+struct connection *
+worker_pool_find_username_connection(struct worker_pool *pool,
+ const char *username);
+
+#endif