HintRouter: use a subfunction for connecting to backends

Also, removed needless runtime capabilities + other fixes according to
comments.
This commit is contained in:
Esa Korhonen
2017-03-27 18:53:30 +03:00
parent 37e9d74253
commit 88b87aceb5
3 changed files with 37 additions and 41 deletions

View File

@ -23,7 +23,10 @@ public:
static HintRouter* create(SERVICE* pService, char** pzOptions);
HintRouterSession* newSession(MXS_SESSION *pSession);
void diagnostics(DCB* pOut);
uint64_t getCapabilities();
uint64_t getCapabilities() const
{
return RCAP_TYPE_NONE;
}
HINT_TYPE get_default_action() const
{
return m_default_action;
@ -48,4 +51,7 @@ private:
private:
HintRouter(const HintRouter&);
HintRouter& operator = (const HintRouter&);
static Dcb connect_to_backend(MXS_SESSION* session, SERVER_REF* sref,
HintRouterSession::BackendMap* all_backends);
};