Skip to content

Commit

Permalink
refactor!: remove some admin APIs (#3821)
Browse files Browse the repository at this point in the history
chore: remove some admin APIs as they have been replaced by the information schema.
  • Loading branch information
fengjiachun authored Apr 28, 2024
1 parent 3112ced commit ed8b136
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 677 deletions.
44 changes: 0 additions & 44 deletions src/meta-srv/src/service/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ mod health;
mod heartbeat;
mod leader;
mod maintenance;
mod meta;
mod node_lease;
mod region_migration;
mod route;
mod util;

use std::collections::HashMap;
Expand Down Expand Up @@ -50,54 +47,13 @@ pub fn make_admin_service(metasrv: Metasrv) -> Admin {
.route("/heartbeat", handler.clone())
.route("/heartbeat/help", handler);

let router = router.route(
"/catalogs",
meta::CatalogsHandler {
table_metadata_manager: metasrv.table_metadata_manager().clone(),
},
);

let handler = meta::SchemasHandler {
table_metadata_manager: metasrv.table_metadata_manager().clone(),
};
let router = router
.route("/schemas", handler.clone())
.route("/schemas/help", handler);

let handler = meta::TablesHandler {
table_metadata_manager: metasrv.table_metadata_manager().clone(),
};
let router = router
.route("/tables", handler.clone())
.route("/tables/help", handler);

let handler = meta::TableHandler {
table_metadata_manager: metasrv.table_metadata_manager().clone(),
};
let router = router
.route("/table", handler.clone())
.route("/table/help", handler);

let router = router.route(
"/leader",
leader::LeaderHandler {
election: metasrv.election().cloned(),
},
);

let handler = route::RouteHandler {
table_metadata_manager: metasrv.table_metadata_manager().clone(),
};
let router = router
.route("/route", handler.clone())
.route("/route/help", handler);

let handler = region_migration::SubmitRegionMigrationTaskHandler {
region_migration_manager: metasrv.region_migration_manager().clone(),
meta_peer_client: metasrv.meta_peer_client().clone(),
};
let router = router.route("/region-migration", handler);

let router = router.route(
"/maintenance",
maintenance::MaintenanceHandler {
Expand Down
239 changes: 0 additions & 239 deletions src/meta-srv/src/service/admin/meta.rs

This file was deleted.

Loading

0 comments on commit ed8b136

Please sign in to comment.