Skip to content

Commit 7f325c5

Browse files
committed
feat:支持负载均衡
1 parent e8b636f commit 7f325c5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/router/default.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
1414
// specific language governing permissions and limitations under the License.
1515

16-
use std::{fmt::format, sync::Arc};
16+
use std::sync::Arc;
1717

1818
use crate::core::{
1919
context::SDKContext,
2020
model::error::{ErrorCode, PolarisError},
2121
};
2222

23-
use super::api::RouterAPI;
23+
use super::{api::RouterAPI, req::ProcessRouteResponse};
2424

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

4447
async fn load_balance(

0 commit comments

Comments
 (0)