mobject-server.h 1.28 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
#include <bake-client.h>
12
#include <sdskv-client.h>
13 14 15
/* server-side utilities and routines.  Clients are looking for either
 * libmobject-store.h or librados-mobject-store.h */

16
#define MOBJECT_SERVER_GROUP_NAME "mobject-store-servers"
17
#define MOBJECT_ABT_POOL_DEFAULT ABT_POOL_NULL
18

19
typedef struct mobject_server_context* mobject_provider_t;
Matthieu Dorier's avatar
Matthieu Dorier committed
20

21 22 23
/**
 * Start a mobject server instance
 *
24
 * @param[in] mid           margo instance id
25 26 27
 * @param[in] mplex_id      multiplex id of the provider
 * @param[in] pool          Argobots pool for the provider
 * @param[in] bake_ph       Bake provider handle to use to write/read data
28
 * @param[in] sdskv_ph      SDSKV provider handle to use to access metadata
29
 * @param[in] cluster_file  file name to write cluster connect info to
30
 * @param[out] provider     resulting provider
31
 * 
32
 * @returns 0 on success, negative error code on failure
33
 */
34 35 36 37 38
int mobject_provider_register(
        margo_instance_id mid,
        uint8_t mplex_id,
        ABT_pool pool,
        bake_provider_handle_t bake_ph,
39
        sdskv_provider_handle_t sdskv_ph,
40 41
        const char *cluster_file,
        mobject_provider_t* provider);
42

43
#endif