Skip to content

Commit

Permalink
*fix an issue where inputstream is sometimes lost.
Browse files Browse the repository at this point in the history
Signed-off-by: provenceee <[email protected]>
  • Loading branch information
provenceee committed Nov 20, 2024
1 parent bc976bf commit eeb568c
Show file tree
Hide file tree
Showing 31 changed files with 255 additions and 624 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2023 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2023-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,7 @@ public class LaneTestEntity implements Serializable {
private final boolean enabled;

/**
* 构造方法
* constructor
*
* @param id id
* @param enabled enabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2023 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2023-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,7 @@ public class LaneTest {
private final boolean isExecuteSpringTest;

/**
* 构造方法
* constructor
*/
public LaneTest() {
baseUrl = "http://127.0.0.1:" + System.getProperty("controller.port", "28019") + "/controller/getLaneBy";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2022-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,7 @@ public class ConsumerTest {
private final String dubboVersion;

/**
* 构造方法
* constructor
*/
public ConsumerTest() {
dubboVersion = System.getProperty("dubbo.running.version");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2022-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,7 @@ public class SpringAndDubboTest {
private final String baseUrl;

/**
* 构造方法
* constructor
*/
public SpringAndDubboTest() {
baseUrl = "http://127.0.0.1:" + System.getProperty("controller.port", "28020") + "/consumer/";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2022-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,7 +60,7 @@ public class RouterTest {
private final boolean isExecuteSpringTest;

/**
* 构造方法
* constructor
*/
public RouterTest() throws InterruptedException {
testTagRouterBaseUrl =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2023 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2023-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -90,7 +90,7 @@ public class LaneTest {
private final boolean shouldTestWebclient;

/**
* 构造方法
* constructor
*/
public LaneTest() {
springCloudVersion = Optional.ofNullable(System.getenv("SPRING_CLOUD_VERSION")).orElse("Hoxton.RELEASE");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2022-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -92,7 +92,7 @@ public class TagRouterTest {
private final String springCloudVersion;

/**
* 构造方法
* constructor
*/
public TagRouterTest() throws InterruptedException {
springCloudVersion = Optional.ofNullable(System.getenv("SPRING_CLOUD_VERSION")).orElse("Hoxton.RELEASE");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2022-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -66,7 +66,7 @@ public class UrlInterceptor extends AbstractInterceptor {
private Set<String> supportRules;

/**
* 构造方法
* constructor
*/
public UrlInterceptor() {
config = PluginConfigManager.getPluginConfig(LoadbalancerConfig.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2022-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,7 @@ public class ClientFactoryDeclarer extends AbstractDeclarer {
private static final String METHOD_NAME = "getInstance";

/**
* 构造方法
* constructor
*/
public ClientFactoryDeclarer() {
super(ENHANCE_CLASS, INTERCEPT_CLASS, METHOD_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class DispatcherServletInterceptor extends AbstractInterceptor {
private Function<Object, String> getRequestUri;

/**
* 构造方法
* constructor
*/
public DispatcherServletInterceptor() {
initFunction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ServiceDiscoveryRegistryDirectoryInterceptor extends AbstractInterc
private final AtomicBoolean isInitialized = new AtomicBoolean();

/**
* 构造方法
* constructor
*/
public ServiceDiscoveryRegistryDirectoryInterceptor() {
invokerRuleStrategyService = PluginServiceManager.getPluginService(InvokerRuleStrategyService.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2023 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (C) 2023-2024 Huawei Technologies Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,6 +60,19 @@ protected Map<String, List<String>> getRequestTag(Map<String, List<String>> head
return map;
}

/**
* Obtain transparent tags
*
* @param path The path of the request
* @param methodName http method
* @param headers HTTP request headers
* @param parameters URL parameter
* @param keys The key of the tag to be obtained
* @return Marks for transparent transmission
*/
public abstract Map<String, List<String>> getRequestTag(String path, String methodName,
Map<String, List<String>> headers, Map<String, List<String>> parameters, Keys keys);

/**
* Collect Lane Count Metric.
*
Expand Down Expand Up @@ -87,4 +100,35 @@ protected void collectLaneCountMetric(Map<String, List<String>> laneTag) {
});
});
}

/**
* Transparent transmission marks the key entity
*
* @author provenceee
* @since 2023-02-21
*/
public static class Keys {
private final Set<String> matchKeys;

private final Set<String> injectTags;

/**
* Constructor
*
* @param matchKeys Label routing transparent transmission markers
* @param injectTags Swim lane transparent markers
*/
public Keys(Set<String> matchKeys, Set<String> injectTags) {
this.matchKeys = matchKeys;
this.injectTags = injectTags;
}

public Set<String> getMatchKeys() {
return matchKeys;
}

public Set<String> getInjectTags() {
return injectTags;
}
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit eeb568c

Please sign in to comment.