forked from apache/eventmesh-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor RemotingService and
SyncFrom...
interfaces (apache#146)
* fix(*)1. 完成项目设计 2. 完成项目与模块搭建 * fix(core):1. 重构 同步模块 2. 重构 remote 模块 * fix(*):1. 格式化代码 。2. 第一次整理代码 * 1. 解决冲突 * 1. 解决冲突 * fix(*):1. 删除多余的代码 * 1. 解决冲突 * fix(ci): 1. 关闭 ci 的 test,重构完在打开 * fix(*):1. 完成控制的重构 * fix(*):1. 解决冲突 * fix(*):1. 解决冲突 * fix(*):1. 解决冲突 * fix(*):1. 解决冲突 --------- Co-authored-by: laohu <2732554140@qq.com>
- Loading branch information
1 parent
5092504
commit d3ffcb5
Showing
302 changed files
with
5,562 additions
and
5,457 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...hboard-common/src/main/java/org/apache/eventmesh/dashboard/common/enums/BusinessType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.eventmesh.dashboard.common.enums; | ||
|
||
/** | ||
* 业务类型, | ||
* storage:可选值(rocketmq,pravega,mongodb,pulsar,redis,kafka,knative,rabbitmq), | ||
* sinkConnector:可选值(rocketmq,spring,pravega,wechat,openfunction,file,knative,pulsar,lark,slack,rabbitmq,redis,mongodb,dingtalk) | ||
* sourceConnector:可选值(rocketmq,spring,pravega,openfunction,jdbc,file,http,wecom,knative,pulsar,prometheus,rabbitmq,redis,mongodb)', | ||
*/ | ||
public enum BusinessType { | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...mon/src/main/java/org/apache/eventmesh/dashboard/common/enums/ClusterTrusteeshipType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.eventmesh.dashboard.common.enums; | ||
|
||
public enum ClusterTrusteeshipType { | ||
|
||
FIRE_AND_FORGET_TRUSTEESHIP, | ||
|
||
TRUSTEESHIP, | ||
|
||
REVERSE, | ||
|
||
NO_TRUSTEESHIP; | ||
|
||
} |
124 changes: 124 additions & 0 deletions
124
...shboard-common/src/main/java/org/apache/eventmesh/dashboard/common/enums/ClusterType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.eventmesh.dashboard.common.enums; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import lombok.Getter; | ||
|
||
public enum ClusterType { | ||
|
||
DEFAULT(1), | ||
|
||
EVENTMESH(20), | ||
|
||
STORAGE(21), | ||
|
||
DEFAULT_TYPE_NAME(1), | ||
|
||
CLUSTER(1), | ||
|
||
META(2), | ||
|
||
RUNTIME(3), | ||
|
||
|
||
RUNTIME_EVENT_RUNTIME(ClusterType.META.code + 1), | ||
|
||
RUNTIME_ROCKETMQ_BROKER(ClusterType.META.code + 31), | ||
|
||
META_TYPE_ETCD(ClusterType.META.code + 1), | ||
|
||
META_TYPE_NACOS(ClusterType.META.code + 2), | ||
|
||
META_TYPE_ROCKETMQ_NAMESERVER(ClusterType.META.code + 31), | ||
|
||
|
||
EVENTMESH_CLUSTER(EVENTMESH, EVENTMESH, CLUSTER, DEFAULT, RemotingType.EVENT_MESH_RUNTIME), | ||
|
||
EVENTMESH_RUNTIME(EVENTMESH, EVENTMESH, RUNTIME, DEFAULT, RemotingType.EVENT_MESH_RUNTIME), | ||
|
||
EVENTMESH_META_ETCD(EVENTMESH, EVENTMESH, META, META_TYPE_ETCD, RemotingType.EVENT_MESH_ETCD), | ||
|
||
EVENTMESH_META_NACOS(EVENTMESH, EVENTMESH, META, META_TYPE_NACOS, RemotingType.EVENT_MESH_NACOS), | ||
|
||
STORAGE_ROCKETMQ(ClusterType.STORAGE.code + 1), | ||
|
||
STORAGE_ROCKETMQ_CLUSTER(STORAGE, STORAGE_ROCKETMQ, CLUSTER, DEFAULT, RemotingType.ROCKETMQ), | ||
|
||
STORAGE_ROCKETMQ_NAMESERVER(STORAGE, STORAGE_ROCKETMQ, META, DEFAULT, RemotingType.ROCKETMQ_NAMESERVER), | ||
|
||
STORAGE_ROCKETMQ_BROKER(STORAGE, STORAGE_ROCKETMQ, RUNTIME, DEFAULT, RemotingType.ROCKETMQ); | ||
|
||
|
||
public static final List<ClusterType> STORAGE_TYPES = getStorage(); | ||
@Getter | ||
private ClusterType eventmeshNodeType; | ||
@Getter | ||
private ClusterType assemblyName; | ||
@Getter | ||
private ClusterType assemblyNodeType; | ||
@Getter | ||
private ClusterType assemblyBusiness; | ||
@Getter | ||
private RemotingType remotingType; | ||
@Getter | ||
private int code; | ||
|
||
ClusterType(int code) { | ||
this.code = code; | ||
} | ||
|
||
|
||
ClusterType(ClusterType eventmeshNodeType, ClusterType assemblyName, ClusterType assemblyNodeType, ClusterType assemblyBusiness, | ||
RemotingType remotingType) { | ||
this.eventmeshNodeType = eventmeshNodeType; | ||
this.assemblyName = assemblyName; | ||
this.assemblyNodeType = assemblyNodeType; | ||
this.assemblyBusiness = assemblyBusiness; | ||
this.remotingType = remotingType; | ||
} | ||
|
||
private static List<ClusterType> getStorage() { | ||
List<ClusterType> list = new ArrayList<>(); | ||
for (ClusterType clusterType : ClusterType.values()) { | ||
if (Objects.equals(clusterType.eventmeshNodeType, ClusterType.STORAGE) && Objects.equals(clusterType.assemblyNodeType, | ||
ClusterType.CLUSTER)) { | ||
list.add(clusterType); | ||
} | ||
} | ||
return list; | ||
} | ||
|
||
public boolean isMainCluster() { | ||
return Objects.equals(this, ClusterType.EVENTMESH_CLUSTER) || Objects.equals(this.assemblyNodeType, ClusterType.CLUSTER); | ||
} | ||
|
||
public boolean isFirstLayer() { | ||
return Objects.equals(this, ClusterType.EVENTMESH_META_NACOS) || Objects.equals(this, ClusterType.EVENTMESH_META_ETCD) || Objects.equals(this, | ||
ClusterType.EVENTMESH_RUNTIME) || Objects.equals(this.getAssemblyNodeType(), ClusterType.CLUSTER); | ||
} | ||
|
||
public boolean isSecondFloor() { | ||
return Objects.equals(eventmeshNodeType, ClusterType.STORAGE) ? (Objects.equals(assemblyNodeType, ClusterType.RUNTIME) || Objects.equals( | ||
assemblyNodeType, ClusterType.META)) : false; | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...hboard-common/src/main/java/org/apache/eventmesh/dashboard/common/enums/RemotingType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.eventmesh.dashboard.common.enums; | ||
|
||
public enum RemotingType { | ||
|
||
NOT, | ||
|
||
META, | ||
|
||
STORAGE, | ||
|
||
EVENT_MESH_RUNTIME, | ||
|
||
EVENT_MESH_NACOS, | ||
|
||
EVENT_MESH_ETCD, | ||
|
||
ROCKETMQ, | ||
ROCKETMQ_NAMESERVER; | ||
} |
29 changes: 29 additions & 0 deletions
29
...ard-common/src/main/java/org/apache/eventmesh/dashboard/common/enums/ResetOffsetMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.eventmesh.dashboard.common.enums; | ||
|
||
public enum ResetOffsetMode { | ||
|
||
CONSUME_FROM_LAST_OFFSET, | ||
|
||
CONSUME_FROM_FIRST_OFFSET, | ||
CONSUME_FROM_TIMESTAMP, | ||
|
||
CONSUME_FROM_DESIGNATED_OFFSET | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.