Add service capabilities

The service capabilities are the union of the capabilities of the
router and all filters.
This commit is contained in:
Johan Wikman
2016-10-21 14:36:36 +03:00
parent 3915b4e7c7
commit bd18a7d8ed
2 changed files with 22 additions and 1 deletions

View File

@ -167,6 +167,7 @@ typedef struct service
struct service *next; /**< The next service in the linked list */
bool retry_start; /*< If starting of the service should be retried later */
bool log_auth_warnings; /*< Log authentication failures and warnings */
uint64_t capabilities; /*< The capabilities of the service. */
} SERVICE;
typedef enum count_spec_t
@ -237,6 +238,19 @@ extern RESULTSET *serviceGetList();
extern RESULTSET *serviceGetListenerList();
extern bool service_all_services_have_listeners();
/**
* Get the capabilities of the servive.
*
* The capabilities of a service are the union of the capabilities of
* its router and all filters.
*
* @return The service capabilities.
*/
static inline uint64_t service_get_capabilities(const SERVICE *service)
{
return service->capabilities;
}
MXS_END_DECLS
#endif