Skip to content

Commit

Permalink
Merge branch 'master' into support_io_uring
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchengming666 authored Mar 25, 2024
2 parents 5bdd901 + 70f16f3 commit 5953e95
Show file tree
Hide file tree
Showing 24 changed files with 1,333 additions and 35 deletions.
6 changes: 6 additions & 0 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@
<artifactId>sofa-rpc-registry-polaris</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-registry-kubernetes</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-remoting-bolt</artifactId>
Expand Down Expand Up @@ -545,6 +550,7 @@
<include>com.alipay.sofa:sofa-rpc-registry-multicast</include>
<include>com.alipay.sofa:sofa-rpc-registry-sofa</include>
<include>com.alipay.sofa:sofa-rpc-registry-polaris</include>
<include>com.alipay.sofa:sofa-rpc-registry-kubernetes</include>
<include>com.alipay.sofa:sofa-rpc-remoting-bolt</include>
<include>com.alipay.sofa:sofa-rpc-remoting-http</include>
<include>com.alipay.sofa:sofa-rpc-remoting-resteasy</include>
Expand Down
16 changes: 15 additions & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
<!-- Build args -->
<module.install.skip>true</module.install.skip>
<module.deploy.skip>true</module.deploy.skip>

<!-- Fabric8 for Kubernetes -->
<fabric8_kubernetes_version>6.9.2</fabric8_kubernetes_version>
<!-- io_uring -->
<netty-iouring.version>0.0.21.Final</netty-iouring.version>
</properties>
Expand Down Expand Up @@ -517,6 +518,19 @@
<version>${grpc.version}</version>
</dependency>

<!-- Fabric8 for Kubernetes -->
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</artifactId>
<version>${fabric8_kubernetes_version}</version>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-server-mock</artifactId>
<scope>test</scope>
<version>${fabric8_kubernetes_version}</version>
</dependency>

<!-- Test libs -->
<dependency>
<groupId>org.apache.curator</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ protected void decorateRequest(SofaRequest request) {
// 额外属性通过HEAD传递给服务端
request.addRequestProp(RemotingConstants.HEAD_APP_NAME, consumerConfig.getAppName());
request.addRequestProp(RemotingConstants.HEAD_PROTOCOL, consumerConfig.getProtocol());
request.addRequestProp(RemotingConstants.HEAD_INVOKE_TYPE, request.getInvokeType());

customRequest(request, internalContext);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,36 @@ public String getParameter(String key) {
return parameters == null ? null : parameters.get(key);
}

/**
* Gets parameter or default.
*
* @param key the key
* @return the value
*/
public String getParameter(String key, String defaultValue) {
return getParameter(key) == null ? defaultValue : getParameter(key);
}

/**
* Gets parameter or default.
*
* @param key the key
* @return the value
*/
public int getParameter(String key, int defaultValue) {
return getParameter(key) == null ? defaultValue : Integer.parseInt(parameters.get(key));
}

/**
* Gets parameter or default.
*
* @param key the key
* @return the value
*/
public boolean getParameter(String key, boolean defaultValue) {
return getParameter(key) == null ? defaultValue : Boolean.parseBoolean(parameters.get(key));
}

@Override
public String toString() {
return "RegistryConfig{" +
Expand Down
1 change: 1 addition & 0 deletions registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<module>registry-multicast</module>
<module>registry-sofa</module>
<module>registry-polaris</module>
<module>registry-kubernetes</module>
</modules>

<dependencyManagement>
Expand Down
39 changes: 39 additions & 0 deletions registry/registry-kubernetes/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-registry</artifactId>
<version>${revision}</version>
</parent>

<artifactId>sofa-rpc-registry-kubernetes</artifactId>

<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-log</artifactId>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-codec-api</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-server-mock</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit 5953e95

Please sign in to comment.