Skip to content

Commit

Permalink
feat(shared_instance): support java
Browse files Browse the repository at this point in the history
  • Loading branch information
ActivePeter committed Jun 10, 2024
1 parent d4c2f52 commit a98d695
Show file tree
Hide file tree
Showing 125 changed files with 8,659 additions and 1,365 deletions.
582 changes: 503 additions & 79 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]
members = [
".",
"./apps/fn2",
"./apps/longchain",
"./apps/word_count",
]

[dependencies]
qp2p = "0.36.4" #{ path = "qp2p" }
tokio = { version = "1.32.0", features = ["full"] }
Expand Down Expand Up @@ -53,6 +45,8 @@ prometheus-client = "0.22.1"
tower-http = {version="0.4.0", features=["cors"]}
tower= "0.4.0"
sled = "0.34.7"
enum-as-inner = "0.6.0"
reqwest = "0.12.4"

[dependencies.uuid]
version = "1.8.0"
Expand Down
161 changes: 0 additions & 161 deletions apps/fn2/Cargo.lock

This file was deleted.

6 changes: 0 additions & 6 deletions apps/fn2/app.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions apps/longchain/app.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions apps/word_count/app.yaml

This file was deleted.

1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fn main() -> Result<()> {
"src/general/network/proto_src/sche.proto",
"src/general/network/proto_src/metric.proto",
"src/general/network/proto_src/remote_sys.proto",
"src/worker/func/shared/process_rpc_proto.proto",
],
&["src/"],
)?;
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions demos/_java_serverless_lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
69 changes: 69 additions & 0 deletions demos/_java_serverless_lib/core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?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>
<groupId>io.serverless_lib</groupId>
<artifactId>serverless-lib-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>serverless-lib</name>
<description>The Serverless Lib Core</description>

<parent>
<groupId>io.serverless_lib</groupId>
<artifactId>serverless-lib</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<properties>
<java.version>17</java.version>
<protobuf.version>3.15.8</protobuf.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>run-custom-command</id>
<phase>generate-sources</phase> <!-- 在生成源码阶段执行 -->
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>python3</executable> <!-- 自定义命令,例如 'echo' -->
<arguments>
<argument>../scripts/prepare_protoc.py</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.serverless_lib;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {
@Bean
public BootArgCheck bootArgCheck() {
return new BootArgCheck();
}

@Bean
public UdsBackend udsBackend() {
return new UdsBackend();
}

@Bean
public RpcHandleOwner rpcHandleOwner() {
return new RpcHandleOwner();
}
}
Loading

0 comments on commit a98d695

Please sign in to comment.