diff options
author | Joshua Colp <jcolp@digium.com> | 2016-06-09 20:25:15 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-06-09 20:25:15 -0500 |
commit | ecc186a4cc1efe47f1d4bdf93d12075bea0daa0a (patch) | |
tree | 0c67a8345694ea85c94579291fbe5e3c0c3f8f00 /include | |
parent | e842a99e7cbf0bbb4a4147329c88a4ec1b2ebee4 (diff) | |
parent | 557333ea4c031d10bf52ceade79c32cbff801c0c (diff) |
Merge "stasis: Add setting subscription congestion levels." into 13
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/stasis.h | 14 | ||||
-rw-r--r-- | include/asterisk/stasis_message_router.h | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/include/asterisk/stasis.h b/include/asterisk/stasis.h index 4fc295bc4..de44206b6 100644 --- a/include/asterisk/stasis.h +++ b/include/asterisk/stasis.h @@ -601,6 +601,20 @@ struct stasis_subscription *stasis_unsubscribe( struct stasis_subscription *subscription); /*! + * \brief Set the high and low alert water marks of the stasis subscription. + * \since 13.10.0 + * + * \param subscription Pointer to a stasis subscription + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int stasis_subscription_set_congestion_limits(struct stasis_subscription *subscription, + long low_water, long high_water); + +/*! * \brief Block until the last message is processed on a subscription. * * This function will not return until the \a subscription's callback for the diff --git a/include/asterisk/stasis_message_router.h b/include/asterisk/stasis_message_router.h index 89657a5ee..50270a788 100644 --- a/include/asterisk/stasis_message_router.h +++ b/include/asterisk/stasis_message_router.h @@ -127,6 +127,20 @@ void stasis_message_router_publish_sync(struct stasis_message_router *router, struct stasis_message *message); /*! + * \brief Set the high and low alert water marks of the stasis message router. + * \since 13.10.0 + * + * \param router Pointer to a stasis message router + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int stasis_message_router_set_congestion_limits(struct stasis_message_router *router, + long low_water, long high_water); + +/*! * \brief Add a route to a message router. * * A particular \a message_type may have at most one route per \a router. If |