Files
MaxScale/server/modules/routing/smartrouter/smartrouter.hh
Niclas Antti 190c0ac634 MXS-2437 Base router for Smart Router.
This is the base for Smart Router. Review and TODO comments are in the
code. This commit will be squashed several times so don't pay attention to this
specific commit message. I will add and remove TODO's in the code, rather
than save them in git commits. RBCommons will contain the history.
2019-06-10 14:40:39 +03:00

44 lines
1.1 KiB
C++

/*
* Copyright (c) 2019 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2022-01-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#pragma once
#define MXS_MODULE_NAME "smartrouter"
/**
* @file Smart Router. Routes queries to the best router for the type of query.
*/
#include <maxscale/ccdefs.hh>
#include <maxscale/router.hh>
class SmartRouterSession;
/** class Smartrouter. Only defines the mxs::Router<> functions needed for all routers.
*/
class SmartRouter : public mxs::Router<SmartRouter, SmartRouterSession>
{
public:
static SmartRouter* create(SERVICE* pService, MXS_CONFIG_PARAMETER* pParams);
SmartRouterSession* newSession(MXS_SESSION* pSession);
void diagnostics(DCB* pDcb);
json_t* diagnostics_json() const;
uint64_t getCapabilities();
bool configure(MXS_CONFIG_PARAMETER* pParams);
SERVICE* service() const;
private:
SmartRouter(SERVICE* service);
};