mobject-server.h 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * (C) 2017 The University of Chicago
 *
 * See COPYRIGHT in top-level directory.
 */

#ifndef MOBJECT_SERVER_H
#define MOBJECT_SERVER_H

10
#include <margo.h>
11 12 13
/* server-side utilities and routines.  Clients are looking for either
 * libmobject-store.h or librados-mobject-store.h */

14 15
#define MOBJECT_SERVER_GROUP_NAME "mobject-store-servers"

Matthieu Dorier's avatar
Matthieu Dorier committed
16 17
typedef struct mobject_server_context mobject_server_context_t;

18 19 20
/**
 * Start a mobject server instance
 *
21 22 23 24
 * @param[in] mid           margo instance id
 * @param[in] cluster_file  file name to write cluster connect info to
 * @returns 0 on success, negative error code on failure
 */
Matthieu Dorier's avatar
Matthieu Dorier committed
25
mobject_server_context_t* mobject_server_init(margo_instance_id mid, const char *cluster_file);
26

27 28 29 30 31
/**
 * Shutdown a mobject server instance
 * 
 * @param[in] mid   margo instance id
 */
Matthieu Dorier's avatar
Matthieu Dorier committed
32
void mobject_server_shutdown(mobject_server_context_t* svr_ctx);
33

34 35 36
/**
 * Wait for a mobject server instance to get a shutdown request.
 */
Matthieu Dorier's avatar
Matthieu Dorier committed
37
void mobject_server_wait_for_shutdown(mobject_server_context_t* srv_ctx);
38

39
#endif