Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #73] Add remoting service #74

Merged
merged 5 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.constant;
package org.apache.eventmesh.dashboard.common.constant;

public class ApiPrefix {
public static final String API_PREFIX = "/eventmesh-dashboard/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.constant.health;
package org.apache.eventmesh.dashboard.common.constant.health;

public class HealthCheckTypeConstant {

Expand All @@ -35,5 +35,5 @@ public class HealthCheckTypeConstant {
public static final String HEALTH_CHECK_SUBTYPE_ROCKETMQ_TOPIC = "rocketmq4-topic";

public static final String HEALTH_CHECK_SUBTYPE_NACOS_CONFIG = "nacos-config";
public static final String HEALTH_CHECK_SUBTYPE_NACOS_REGISTER = "nacos-register";
public static final String HEALTH_CHECK_SUBTYPE_NACOS_REGISTRY = "nacos-registry";
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.constant.health;
package org.apache.eventmesh.dashboard.common.constant.health;

public class HealthConstant {
public static final String NEW_LINE_ENDING = "\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums;
package org.apache.eventmesh.dashboard.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StatusEnum {
public enum DataStatus {
INACTIVE(0, "Inactive"),
Lambert-Rao marked this conversation as resolved.
Show resolved Hide resolved
ACTIVE(1, "Active");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums;
package org.apache.eventmesh.dashboard.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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 lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum StoreType {

STANDALONE(0, "Standalone"),
ROCKETMQ(1, "RocketMQ"),
KAFKA(2, "Kafka"),
PULSAR(3, "Pulsar"),
RABBITMQ(4, "RabbitMQ"),
REDIS(5, "Redis");

@Getter
private final Integer number;
@Getter
private final String name;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums.health;
package org.apache.eventmesh.dashboard.common.enums.health;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,24 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.console.enums.health;
package org.apache.eventmesh.dashboard.common.enums.health;

import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_CLUSTER;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_RUNTIME;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_STORAGE;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_TOPIC;
import static org.apache.eventmesh.dashboard.console.constant.health.HealthCheckTypeConstant.HEALTH_CHECK_TYPE_UNKNOWN;
import org.apache.eventmesh.dashboard.common.constant.health.HealthCheckTypeConstant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum HealthCheckType {
UNKNOWN(0, HEALTH_CHECK_TYPE_UNKNOWN),
UNKNOWN(0, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_UNKNOWN),

CLUSTER(1, HEALTH_CHECK_TYPE_CLUSTER),
CLUSTER(1, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_CLUSTER),

RUNTIME(2, HEALTH_CHECK_TYPE_RUNTIME),
RUNTIME(2, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_RUNTIME),

TOPIC(3, HEALTH_CHECK_TYPE_TOPIC),
TOPIC(3, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_TOPIC),

STORAGE(4, HEALTH_CHECK_TYPE_STORAGE);
STORAGE(4, HealthCheckTypeConstant.HEALTH_CHECK_TYPE_STORAGE);

@Getter
private final Integer number;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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.metadata;

public enum MetadataServiceTypeEnum {

RUNTIME,

CENTER_ETCD,

META_NACOS,
Lambert-Rao marked this conversation as resolved.
Show resolved Hide resolved

TOPIC,

CLUSTER,

CLIENT,

GROUP,

CONNECTION,

Lambert-Rao marked this conversation as resolved.
Show resolved Hide resolved

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.metadata;

public enum MetadataTypeEnum {

CENTER,
Lambert-Rao marked this conversation as resolved.
Show resolved Hide resolved

CLUSTER,

RUNTIME,

TOPIC,

GROUP,

SUBSCRIPTION,

STORE
Lambert-Rao marked this conversation as resolved.
Show resolved Hide resolved
;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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.model.metadata;

import lombok.Data;

@Data
public class AclMetadata {

Lambert-Rao marked this conversation as resolved.
Show resolved Hide resolved
private Long clusterId;
private String principal;
private Integer operation;
private String permissionType;
private String host;
private String resourceType;
private String resourceName;
private Integer patternType;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* 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.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class ClientMetadata extends MetadataConfig {


{
this.setServiceTypeEnums(MetadataServiceTypeEnum.CLIENT);
}

private String name;

private String platform;

/**
* programing language of client
*/
private String language;

/**
* process id
*/
private Long pid;

private String host;

private Integer port;

/**
* protocol used to connect to runtime.
*/
private String protocol;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* 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.model.metadata;

import org.apache.eventmesh.dashboard.common.enums.StoreType;
import org.apache.eventmesh.dashboard.common.enums.metadata.MetadataServiceTypeEnum;

import lombok.Data;

@Data
public class ClusterMetadata extends MetadataConfig {

{
this.setServiceTypeEnums(MetadataServiceTypeEnum.CLUSTER);
}

private String clusterName;

private String registryAddress;

private String bootstrapServers;

private String eventmeshVersion;

private String clientProperties;

private String jmxProperties;

private String regProperties;

private Integer authType;

private Integer runState;

private Integer status;

private StoreType storeType;

private String description;
}
Loading
Loading