Motr  M0
reqh_service.h File Reference
#include "lib/atomic.h"
#include "lib/chan.h"
#include "lib/tlist.h"
#include "lib/bob.h"
#include "lib/mutex.h"
#include "lib/semaphore.h"
#include "lib/types.h"
#include "be/tx.h"
#include "conf/schema.h"
#include "fid/fid.h"
#include "rpc/link.h"
#include "sm/sm.h"
Include dependency graph for reqh_service.h:

Go to the source code of this file.

Data Structures

struct  m0_reqh_service
 
struct  m0_reqh_service_start_async_ctx
 
struct  m0_reqh_service_ops
 
struct  m0_reqh_service_type_ops
 
struct  m0_reqh_service_type
 
struct  m0_reqh_service_txid
 
struct  m0_reqh_service_ctx
 

Macros

#define __MOTR_REQH_REQH_SERVICE_H__
 

Enumerations

enum  m0_reqh_service_state {
  M0_RST_INITIALISING, M0_RST_INITIALISED, M0_RST_STARTING, M0_RST_STARTED,
  M0_RST_STOPPING, M0_RST_STOPPED, M0_RST_FAILED
}
 
enum  m0_service_health { M0_HEALTH_GOOD = 0, M0_HEALTH_BAD = 1, M0_HEALTH_INACTIVE = 2, M0_HEALTH_UNKNOWN = 3 }
 
enum  m0_reqh_service_level {
  M0_RS_LEVEL_UNKNOWN = 0, M0_RS_LEVEL_EARLIEST = 5, M0_RS_LEVEL_EARLY = 10, M0_RS_LEVEL_BEFORE_NORMAL = 20,
  M0_RS_LEVEL_NORMAL = 30, M0_RS_LEVEL_AFTER_NORMAL = 40, M0_RS_LEVEL_LATE = 50, M0_BE_TX_SVC_LEVEL = M0_RS_LEVEL_EARLY,
  M0_SS_SVC_LEVEL = M0_RS_LEVEL_BEFORE_NORMAL, M0_RM_SVC_LEVEL = M0_RS_LEVEL_BEFORE_NORMAL + 1, M0_MD_SVC_LEVEL = M0_RS_LEVEL_NORMAL, M0_HA_LINK_SVC_LEVEL = M0_RS_LEVEL_BEFORE_NORMAL - 1,
  M0_FDMI_SVC_LEVEL = M0_RS_LEVEL_BEFORE_NORMAL - 1, M0_HA_ENTRYPOINT_SVC_LEVEL = M0_RS_LEVEL_BEFORE_NORMAL - 1, M0_RPC_SVC_LEVEL = M0_HA_LINK_SVC_LEVEL - 1
}
 

Functions

M0_INTERNAL int m0_reqh_service_allocate (struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
 
M0_INTERNAL struct m0_reqh_service_typem0_reqh_service_type_find (const char *sname)
 
M0_INTERNAL int m0_reqh_service_start_async (struct m0_reqh_service_start_async_ctx *asc)
 
M0_INTERNAL void m0_reqh_service_started (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_reqh_service_failed (struct m0_reqh_service *service)
 
M0_INTERNAL int m0_reqh_service_start (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_reqh_service_prepare_to_stop (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_reqh_service_stop (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_reqh_service_init (struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
 
M0_INTERNAL void m0_reqh_service_fini (struct m0_reqh_service *service)
 
int m0_reqh_service_type_register (struct m0_reqh_service_type *rstype)
 
void m0_reqh_service_type_unregister (struct m0_reqh_service_type *rstype)
 
M0_INTERNAL int m0_reqh_service_types_init (void)
 
M0_INTERNAL void m0_reqh_service_types_fini (void)
 
M0_INTERNAL bool m0_reqh_service_invariant (const struct m0_reqh_service *svc)
 
M0_INTERNAL struct m0_reqh_servicem0_reqh_service_find (const struct m0_reqh_service_type *st, const struct m0_reqh *reqh)
 
M0_INTERNAL struct m0_reqh_servicem0_reqh_service_lookup (const struct m0_reqh *reqh, const struct m0_fid *fid)
 
M0_INTERNAL int m0_reqh_service_types_length (void)
 
M0_INTERNAL bool m0_reqh_service_is_registered (const char *sname)
 
M0_INTERNAL void m0_reqh_service_list_print (void)
 
M0_INTERNAL int m0_reqh_service_state_get (const struct m0_reqh_service *s)
 
M0_INTERNAL int m0_reqh_service_setup (struct m0_reqh_service **out, struct m0_reqh_service_type *stype, struct m0_reqh *reqh, struct m0_reqh_context *rctx, const struct m0_fid *fid)
 
M0_INTERNAL void m0_reqh_service_quit (struct m0_reqh_service *svc)
 
int m0_reqh_service_async_start_simple (struct m0_reqh_service_start_async_ctx *asc)
 
M0_INTERNAL int m0_reqh_service_ctx_init (struct m0_reqh_service_ctx *ctx, struct m0_conf_obj *svc_obj, enum m0_conf_service_type stype, struct m0_rpc_machine *rmach, const char *addr, uint32_t max_rpc_nr_in_flight)
 
M0_INTERNAL void m0_reqh_service_ctx_fini (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL int m0_reqh_service_ctx_create (struct m0_conf_obj *svc_obj, enum m0_conf_service_type stype, struct m0_rpc_machine *rmach, const char *addr, uint32_t max_rpc_nr_in_flight, struct m0_reqh_service_ctx **out)
 
M0_INTERNAL void m0_reqh_service_ctx_destroy (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL void m0_reqh_service_ctxs_shutdown_prepare (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_service_connect (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL bool m0_reqh_service_ctx_is_connected (const struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL void m0_reqh_service_disconnect (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL void m0_reqh_service_cancel_reconnect (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL void m0_reqh_service_connect_wait (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL int m0_reqh_service_disconnect_wait (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL struct m0_reqh_service_ctxm0_reqh_service_ctx_from_session (struct m0_rpc_session *session)
 
M0_INTERNAL void m0_reqh_service_ctx_subscribe (struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL void m0_reqh_service_ctx_unsubscribe (struct m0_reqh_service_ctx *ctx)
 

Macro Definition Documentation

◆ __MOTR_REQH_REQH_SERVICE_H__

#define __MOTR_REQH_REQH_SERVICE_H__

Definition at line 26 of file reqh_service.h.