Skip to content

Commit

Permalink
feat:支持负载均衡
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Oct 18, 2024
1 parent e8b636f commit 7f325c5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/router/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

use std::{fmt::format, sync::Arc};
use std::sync::Arc;

use crate::core::{
context::SDKContext,
model::error::{ErrorCode, PolarisError},
};

use super::api::RouterAPI;
use super::{api::RouterAPI, req::ProcessRouteResponse};

pub struct DefaultRouterAPI {
context: Arc<SDKContext>,
Expand All @@ -38,7 +38,10 @@ impl RouterAPI for DefaultRouterAPI {
&self,
req: super::req::ProcessRouteRequest,
) -> Result<super::req::ProcessRouteResponse, PolarisError> {
todo!()
// FIXME: 需要支持路由规则,当前直接原封不动进行返回
Ok(ProcessRouteResponse {
service_instances: req.service_instances,
})
}

async fn load_balance(
Expand Down

0 comments on commit 7f325c5

Please sign in to comment.