Motr
M0
|
#include <reqh_service.h>
Data Fields | |
int(* | rso_start_async )(struct m0_reqh_service_start_async_ctx *asc) |
int(* | rso_start )(struct m0_reqh_service *service) |
void(* | rso_prepare_to_stop )(struct m0_reqh_service *service) |
void(* | rso_stop )(struct m0_reqh_service *service) |
void(* | rso_fini )(struct m0_reqh_service *service) |
int(* | rso_fop_accept )(struct m0_reqh_service *service, struct m0_fop *fop) |
enum m0_service_health(* | rso_health )(struct m0_reqh_service *service) |
Service specific operations vector.
Definition at line 330 of file reqh_service.h.
void(* rso_fini) (struct m0_reqh_service *service) |
Destroys a particular service. This is invoked from m0_reqh_service_fini(). Initially generic part of the service is finalised, followed by the service specific finalisation.
service | Service to be finalised |
Definition at line 399 of file reqh_service.h.
int(* rso_fop_accept) (struct m0_reqh_service *service, struct m0_fop *fop) |
Method to determine if an incoming FOP for this service should be accepted when the service is stopping or will shortly be stopped. The method is optional and need not be specified.
Definition at line 408 of file reqh_service.h.
enum m0_service_health(* rso_health) (struct m0_reqh_service *service) |
Method to determine that service functioning properly and is able to process incoming requests. If some error happens during invocation, then M0_HEALTH_UNKNOWN should be returned. The method is optional.
Definition at line 417 of file reqh_service.h.
void(* rso_prepare_to_stop) (struct m0_reqh_service *service) |
Optional method to notify the service that the request handler is preparing to shut down. After this call is made the request handler will block waiting for FOM termination, so any long lived service FOMs should notified that they should stop by this method. The service will be in the M0_RST_STOPPING state when the method is invoked.
Definition at line 371 of file reqh_service.h.
int(* rso_start) (struct m0_reqh_service *service) |
Optional operation to perform service specific startup operations synchronously. Either this method or rso_start_async() must be provided.
Once started, incoming requests related to this service are ready to be processed by the corresponding request handler. Service startup can involve operations like initialising service specific fops, &c which may fail due to whichever reason, in that case the service is finalised and appropriate error is returned.
This is invoked from m0_reqh_service_start(). Once the service specific startup operations are performed, the service is registered with the request handler.
Definition at line 360 of file reqh_service.h.
int(* rso_start_async) (struct m0_reqh_service_start_async_ctx *asc) |
Optional operation to asynchronously ready to transition a service to the M0_RST_STARTED state. Either this method or rso_start() must be provided.
This method is invoked by m0_reqh_service_start_async().
Definition at line 341 of file reqh_service.h.
void(* rso_stop) (struct m0_reqh_service *service) |
Performs service specific finalisation of objects. Once stopped, no incoming request related to this service on a node will be processed further. Stopping a service can involve operations like finalising service specific fops, &c. This is invoked from m0_reqh_service_stop(). Once the service specific objects are finalised, the service is unregistered from request handler.
The service will be in the M0_RST_STOPPED state when the method is invoked.
Definition at line 387 of file reqh_service.h.