Search in sources :

Example 1 with MycatNodeConfig

use of io.mycat.config.model.MycatNodeConfig in project Mycat-Server by MyCATApache.

the class ShowMyCATCluster method getRow.

private static RowDataPacket getRow(MycatNode node, String charset) {
    MycatNodeConfig conf = node.getConfig();
    RowDataPacket row = new RowDataPacket(FIELD_COUNT);
    row.add(StringUtil.encode(conf.getHost(), charset));
    row.add(IntegerUtil.toBytes(conf.getWeight()));
    return row;
}
Also used : MycatNodeConfig(io.mycat.config.model.MycatNodeConfig) RowDataPacket(io.mycat.net.mysql.RowDataPacket)

Example 2 with MycatNodeConfig

use of io.mycat.config.model.MycatNodeConfig in project Mycat-Server by MyCATApache.

the class ShowCobarCluster method getRow.

private static RowDataPacket getRow(MycatNode node, String charset) {
    MycatNodeConfig conf = node.getConfig();
    RowDataPacket row = new RowDataPacket(FIELD_COUNT);
    row.add(StringUtil.encode(conf.getHost(), charset));
    row.add(IntegerUtil.toBytes(conf.getWeight()));
    return row;
}
Also used : MycatNodeConfig(io.mycat.config.model.MycatNodeConfig) RowDataPacket(io.mycat.net.mysql.RowDataPacket)

Aggregations

MycatNodeConfig (io.mycat.config.model.MycatNodeConfig)2 RowDataPacket (io.mycat.net.mysql.RowDataPacket)2