Skip to content

Commit 1d177a1

Browse files
authored
Rename java proxy to mesh worker service (#138)
Fixed #134
1 parent e06d7be commit 1d177a1

33 files changed

Lines changed: 382 additions & 232 deletions

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ jobs:
9191
password: ${{ secrets.IMAGE_GITHUB_TOKEN }}
9292

9393
- name: Auto generate crd model
94-
run: cd java-proxy && ./tool/generate-crd.sh
94+
run: cd mesh-worker-service && ./tool/generate-crd.sh
9595

9696
- name: Format license
97-
run: cd java-proxy && mvn license:format
97+
run: cd mesh-worker-service && mvn license:format
9898

99-
- name: Run mesh proxy unit test
99+
- name: Run mesh worker service unit test
100100
run: |
101-
cd java-proxy
101+
cd mesh-worker-service
102102
mvn clean install
103103
104-
- name: Upload java proxy nar package to release
104+
- name: Upload mesh worker service nar package to release
105105
uses: svenstaro/upload-release-action@v2
106106
with:
107107
repo_token: ${{ secrets.GITHUB_TOKEN }}
108-
file: java-proxy/target/java-proxy-${{ github.event.release.tag_name }}.nar
109-
asset_name: java-proxy-${{ github.event.release.tag_name }}.nar
108+
file: mesh-worker-service/target/mesh-worker-service-${{ github.event.release.tag_name }}.nar
109+
asset_name: mesh-worker-service-${{ github.event.release.tag_name }}.nar
110110
tag: ${{ github.ref }}
111-
overwrite: true
111+
overwrite: true

.github/workflows/test-function-mesh-proxy.yml renamed to .github/workflows/test-mesh-worker-service.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
password: ${{ secrets.IMAGE_GITHUB_TOKEN }}
3636

3737
- name: Auto generate crd model
38-
run: cd java-proxy && ./tool/generate-crd.sh
38+
run: cd mesh-worker-service && ./tool/generate-crd.sh
3939

4040
- name: Format license
41-
run: cd java-proxy && mvn license:format
41+
run: cd mesh-worker-service && mvn license:format
4242

4343
- name: Run mesh proxy unit test
44-
run: cd java-proxy && mvn clean install
44+
run: cd mesh-worker-service && mvn clean install
4545

java-proxy/src/main/resources/META-INF/services/pulsar-functions-worker-service.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ data/
3737
**/*.versionsBackup
3838

3939
# ignore all crd file by auto generated
40-
src/main/java/io/functionmesh/functions/*
41-
src/main/java/io/functionmesh/sources/*
42-
src/main/java/io/functionmesh/sinks/*
40+
src/main/java/io/functionmesh/compute/functions/*
41+
src/main/java/io/functionmesh/compute/sources/*
42+
src/main/java/io/functionmesh/compute/sinks/*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Java Proxy
1+
## Mesh Worker Service
22

33
This is a proxy that is used to forward requests to the k8s.
44

@@ -13,7 +13,7 @@ This is a proxy that is used to forward requests to the k8s.
1313
Add the following configuration to the `functions_worker.yml` configuration file:
1414

1515
```$xslt
16-
functionsWorkerServiceNarPackage: /YOUR-NAR-PATH/java-proxy-1.0-SNAPSHOT.nar
16+
functionsWorkerServiceNarPackage: /YOUR-NAR-PATH/mesh-worker-service-1.0-SNAPSHOT.nar
1717
```
1818
Replace the `YOUR-NAR-PATH` variable with your real path.
1919

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<modelVersion>4.0.0</modelVersion>
2626

2727
<groupId>io.functionmesh.proxy</groupId>
28-
<artifactId>java-proxy</artifactId>
28+
<artifactId>mesh-worker-service</artifactId>
2929
<version>0.1.4-SNAPSHOT</version>
3030

3131
<properties>

java-proxy/src/main/java/io/functionmesh/proxy/FunctionMeshProxyWorker.java renamed to mesh-worker-service/src/main/java/io/functionmesh/compute/MeshWorker.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
package io.functionmesh.proxy;
19+
package io.functionmesh.compute;
2020

2121
import io.netty.util.concurrent.DefaultThreadFactory;
2222
import lombok.extern.slf4j.Slf4j;
@@ -43,7 +43,7 @@
4343
* This class for test.
4444
*/
4545
@Slf4j
46-
public class FunctionMeshProxyWorker {
46+
public class MeshWorker {
4747

4848
private ZooKeeperClientFactory zkClientFactory = null;
4949
private final OrderedExecutor orderedExecutor = OrderedExecutor.newBuilder().numThreads(8).name("zk-cache-ordered").build();
@@ -57,9 +57,9 @@ public class FunctionMeshProxyWorker {
5757
private WorkerServer server;
5858

5959

60-
public FunctionMeshProxyWorker(WorkerConfig workerConfig) {
60+
public MeshWorker(WorkerConfig workerConfig) {
6161
this.workerConfig = workerConfig;
62-
this.workerService = new FunctionMeshProxyService();
62+
this.workerService = new MeshWorkerService();
6363
this.errorNotifier = ErrorNotifier.getDefaultImpl();
6464
}
6565

java-proxy/src/main/java/io/functionmesh/proxy/FunctionMeshProxyService.java renamed to mesh-worker-service/src/main/java/io/functionmesh/compute/MeshWorkerService.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
package io.functionmesh.proxy;
19+
package io.functionmesh.compute;
2020

21-
import io.functionmesh.proxy.rest.api.FunctionsImpl;
22-
import io.functionmesh.proxy.rest.api.SinksImpl;
23-
import io.functionmesh.proxy.rest.api.SourcesImpl;
21+
import io.functionmesh.compute.rest.api.FunctionsImpl;
22+
import io.functionmesh.compute.rest.api.SinksImpl;
23+
import io.functionmesh.compute.rest.api.SourcesImpl;
2424
import io.kubernetes.client.openapi.ApiClient;
2525
import io.kubernetes.client.openapi.apis.CoreV1Api;
2626
import io.kubernetes.client.openapi.apis.CustomObjectsApi;
@@ -50,23 +50,23 @@
5050
*/
5151
@Slf4j
5252
@Getter
53-
public class FunctionMeshProxyService implements WorkerService {
53+
public class MeshWorkerService implements WorkerService {
5454

5555
private volatile boolean isInitialized = false;
5656

5757
private WorkerConfig workerConfig;
58-
private Functions<FunctionMeshProxyService> functions;
59-
private FunctionsV2<FunctionMeshProxyService> functionsV2;
60-
private Sinks<FunctionMeshProxyService> sinks;
61-
private Sources<FunctionMeshProxyService> sources;
58+
private Functions<MeshWorkerService> functions;
59+
private FunctionsV2<MeshWorkerService> functionsV2;
60+
private Sinks<MeshWorkerService> sinks;
61+
private Sources<MeshWorkerService> sources;
6262
private CoreV1Api coreV1Api;
6363
private CustomObjectsApi customObjectsApi;
6464
private ApiClient apiClient;
6565

6666
private AuthenticationService authenticationService;
6767
private AuthorizationService authorizationService;
6868

69-
public FunctionMeshProxyService() {
69+
public MeshWorkerService() {
7070

7171
}
7272

@@ -86,9 +86,9 @@ public void initInBroker(ServiceConfiguration brokerConfig,
8686
public void init(WorkerConfig workerConfig) throws Exception {
8787
this.workerConfig = workerConfig;
8888
this.initKubernetesClient();
89-
this.functions = new FunctionsImpl(() -> FunctionMeshProxyService.this);
90-
this.sources = new SourcesImpl(() -> FunctionMeshProxyService.this);
91-
this.sinks = new SinksImpl(() -> FunctionMeshProxyService.this);
89+
this.functions = new FunctionsImpl(() -> MeshWorkerService.this);
90+
this.sources = new SourcesImpl(() -> MeshWorkerService.this);
91+
this.sinks = new SinksImpl(() -> MeshWorkerService.this);
9292
}
9393

9494
private void initKubernetesClient() throws IOException {

0 commit comments

Comments
 (0)