MXS-2219 Provide STL iterator for MXS_MONITORED_SERVER
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#include <maxbase/semaphore.hh>
|
#include <maxbase/semaphore.hh>
|
||||||
#include <maxbase/worker.hh>
|
#include <maxbase/worker.hh>
|
||||||
|
#include <maxbase/iterator.hh>
|
||||||
#include <maxbase/jansson.h>
|
#include <maxbase/jansson.h>
|
||||||
#include <maxscale/config.hh>
|
#include <maxscale/config.hh>
|
||||||
#include <maxscale/dcb.hh>
|
#include <maxscale/dcb.hh>
|
||||||
@ -215,6 +216,21 @@ struct MXS_MONITORED_SERVER
|
|||||||
struct MXS_MONITORED_SERVER* next; /**< The next server in the list */
|
struct MXS_MONITORED_SERVER* next; /**< The next server in the list */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace std
|
||||||
|
{
|
||||||
|
|
||||||
|
inline mxb::intrusive_slist_iterator<MXS_MONITORED_SERVER> begin(MXS_MONITORED_SERVER& monitored_server)
|
||||||
|
{
|
||||||
|
return mxb::intrusive_slist_iterator<MXS_MONITORED_SERVER>(monitored_server);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline mxb::intrusive_slist_iterator<MXS_MONITORED_SERVER> end(MXS_MONITORED_SERVER& monitored_server)
|
||||||
|
{
|
||||||
|
return mxb::intrusive_slist_iterator<MXS_MONITORED_SERVER>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#define MAX_MONITOR_USER_LEN 512
|
#define MAX_MONITOR_USER_LEN 512
|
||||||
#define MAX_MONITOR_PASSWORD_LEN 512
|
#define MAX_MONITOR_PASSWORD_LEN 512
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user