Compare commits

..

1 Commits

Author SHA1 Message Date
nudtpc 5de4900c28 Update pcm_deploy.md
Former-commit-id: e288b2e81faa0dbb0ad36793919d3b62a22132c6
2024-04-29 08:34:09 +08:00
769 changed files with 15675 additions and 20468 deletions

View File

@ -1,53 +0,0 @@
version: 2
name: aly
description: 发布环境https://comnet.jointcloud.net
global:
concurrent: 1
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
remote_url: '"https://gitlink.org.cn/JointCloud/pcm-coordinator.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((aly.docker_user))
docker_password: ((aly.docker_password))
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-core-api"'
image_tag: '"latest"'
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: git_clone_0.git_path
image_clean: true
image_push: true
build_args: '""'
needs:
- git_clone_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_private_key: ((aly.ssh_private_key))
ssh_ip: '"47.92.39.128"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"kubectl rollout restart deployment pcm-core-api -n ns-admin"'
needs:
- docker_image_build_0

99
.devops/api.yml Normal file
View File

@ -0,0 +1,99 @@
version: 2
name: api
description: ""
global:
concurrent: 1
param:
- ref: deploy_path
name: deploy_path
value: '"pcm-coordinator-api.yaml"'
required: false
type: STRING
hidden: false
- ref: secret_name
name: ""
value: '"jcce-aliyuncs"'
required: false
type: STRING
hidden: false
- ref: project_name
name: ""
value: '"pcm-coordinator-api"'
required: false
type: STRING
hidden: false
trigger:
webhook: gitlink@1.0.0
event:
- ref: create_tag
ruleset:
- param-ref: tag
operator: EQ
value: '""'
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.6
input:
remote_url: '"https://gitlink.org.cn/JointCloud/pcm-coordinator.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((dev.docker_user))
docker_password: ((dev.docker_password))
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-api"'
image_tag: git_clone_0.commit_time
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: git_clone_0.git_path + '/api/Dockerfile'
docker_build_path: git_clone_0.git_path
workspace: git_clone_0.git_path
image_clean: true
image_push: true
build_args: '""'
needs:
- shell_0
- ref: end
name: 结束
task: end
needs:
- kubectl_deploy_0
- ref: kubectl_deploy_0
name: kubectl部署资源
task: kubectl_deploy@1.1.0
input:
command: '"apply"'
resource_file_path: git_clone_0.git_path + '/api'
certificate_authority_data: ((dev.k8s_cad))
server: '"https://119.45.100.73:6443"'
client_certificate_data: ((dev.k8s_ccd))
client_key_data: ((dev.k8s_ckd))
hosts: '""'
needs:
- docker_image_build_0
- ref: shell_0
name: shell
image: docker.jianmuhub.com/library/debian:buster-slim
env:
IMAGE_NAME: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-api"'
IMAGE_TAG: git_clone_0.commit_time
SECRET_NAME: global.secret_name
PROJECT_NAME: global.project_name
PROJECT_PATH: git_clone_0.git_path
script:
- cd ${PROJECT_PATH}/api
- sed -i "s#image_name#${IMAGE_NAME}:${IMAGE_TAG}#" ${PROJECT_NAME}.yaml
- sed -i "s#secret_name#${SECRET_NAME}#" ${PROJECT_NAME}.yaml
- cat ${PROJECT_NAME}.yaml
needs:
- git_clone_0

99
.devops/rpc.yml Normal file
View File

@ -0,0 +1,99 @@
version: 2
name: rpc
description: ""
global:
concurrent: 1
param:
- ref: deploy_path
name: deploy_path
value: '"pcm-coordinator-rpc.yaml"'
required: false
type: STRING
hidden: false
- ref: secret_name
name: ""
value: '"jcce-aliyuncs"'
required: false
type: STRING
hidden: false
- ref: project_name
name: ""
value: '"pcm-coordinator-rpc"'
required: false
type: STRING
hidden: false
trigger:
webhook: gitlink@1.0.0
event:
- ref: create_tag
ruleset:
- param-ref: tag
operator: EQ
value: '""'
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.6
input:
remote_url: '"https://gitlink.org.cn/JointCloud/pcm-coordinator.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((dev.docker_user))
docker_password: ((dev.docker_password))
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-rpc"'
image_tag: git_clone_0.commit_time
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: git_clone_0.git_path + '/rpc/Dockerfile'
docker_build_path: git_clone_0.git_path
workspace: git_clone_0.git_path
image_clean: true
image_push: true
build_args: '""'
needs:
- shell_0
- ref: end
name: 结束
task: end
needs:
- kubectl_deploy_0
- ref: kubectl_deploy_0
name: kubectl部署资源
task: kubectl_deploy@1.1.0
input:
command: '"apply"'
resource_file_path: git_clone_0.git_path + '/rpc'
certificate_authority_data: ((dev.k8s_cad))
server: '"https://119.45.100.73:6443"'
client_certificate_data: ((dev.k8s_ccd))
client_key_data: ((dev.k8s_ckd))
hosts: '""'
needs:
- docker_image_build_0
- ref: shell_0
name: shell
image: docker.jianmuhub.com/library/debian:buster-slim
env:
IMAGE_NAME: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-coordinator-rpc"'
IMAGE_TAG: git_clone_0.commit_time
SECRET_NAME: global.secret_name
PROJECT_NAME: global.project_name
PROJECT_PATH: git_clone_0.git_path
script:
- cd ${PROJECT_PATH}/rpc
- sed -i "s#image_name#${IMAGE_NAME}:${IMAGE_TAG}#" ${PROJECT_NAME}.yaml
- sed -i "s#secret_name#${SECRET_NAME}#" ${PROJECT_NAME}.yaml
- cat ${PROJECT_NAME}.yaml
needs:
- git_clone_0

View File

@ -1,65 +0,0 @@
version: 2
name: 阿里云
description: ""
global:
concurrent: 1
param:
- ref: ssh_host
name: ""
value: '"47.92.39.128"'
required: false
type: STRING
hidden: true
- ref: ssh_user
name: ""
value: '"root"'
required: false
type: STRING
hidden: true
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
remote_url: '"https://gitlink.org.cn/JointCloud/pcm-coordinator.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((aly.docker_user))
docker_password: ((aly.docker_password))
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/pcm-core-api"'
image_tag: '"latest"'
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: git_clone_0.git_path
workspace: git_clone_0.git_path
image_push: true
build_args: '""'
needs:
- git_clone_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_private_key: ((aly.ssh_private_key))
ssh_ip: global.ssh_host
ssh_port: '"22"'
ssh_user: global.ssh_user
ssh_cmd: '"kubectl rollout restart deployment pcm-core-api -n ns-admin"'
needs:
- docker_image_build_0

View File

@ -1,54 +0,0 @@
name: Docker
on:
push:
branches: [ "master" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "master" ]
workflow_dispatch: # 允许手动触发
env:
REGISTRY: registry.cn-hangzhou.aliyuncs.com # 修改为你的阿里云镜像仓库地址
IMAGE_NAME: jcce/pcm-core-api # 修改为你的阿里云镜像仓库名称
IMAGE_TAG: latest
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.ALIYUN_USERNAME }}
password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Build and push multi-arch image
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} --push .
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- name: SSH to remote server and restart deployment
if: github.event_name != 'pull_request'
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "kubectl rollout restart deployment ${{ secrets.SSH_DEPLOYMENT }} -n ${{ secrets.SSH_NAMESPACE }}"

View File

@ -1,26 +0,0 @@
name: Sync Mirror Repository
on:
schedule:
- cron: '0 */8 * * *' # 每小时同步一次
workflow_dispatch: # 允许手动触发
jobs:
mirror:
runs-on: ubuntu-latest
timeout-minutes: 10 # 设置作业的超时时间为10分钟
steps:
- name: Checkout target repository
uses: actions/checkout@v2
with:
fetch-depth: 1 # 获取完整的提交历史
- name: Mirror source repository
uses: wearerequired/git-mirror-action@v1
with:
source-repo: "https://gitlink.org.cn/JointCloud/pcm-coordinator.git" # 源仓库的URL
destination-repo: "git@github.com:${{ github.repository }}.git" # 目标仓库的URL
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

5
.gitignore vendored
View File

@ -13,6 +13,9 @@ PCM
*.out
coverage.txt
# Dependency directories (remove the comment below to include it)
vendor/
# buf for protobuf
buf.lock
@ -24,5 +27,5 @@ buf.lock
configs/tenanter.yaml
log/
/go_build_gitlink_org_cn_JCCE_PCM
/cache/
/vendor/

View File

@ -1,29 +0,0 @@
FROM --platform=$BUILDPLATFORM golang:alpine AS builder
WORKDIR /app
COPY . .
ENV GO111MODULE=on GOPROXY=https://goproxy.cn,direct
RUN go mod download
ARG TARGETOS
ARG TARGETARCH
# 使用 GOOS 和 GOARCH 环境变量来构建不同架构的二进制文件
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -o pcm-core-api
FROM --platform=$TARGETPLATFORM alpine:latest
WORKDIR /app
#修改alpine源为上海交通大学
RUN apk add --no-cache ca-certificates && update-ca-certificates && \
apk add --update tzdata && \
rm -rf /var/cache/apk/*
COPY --from=builder /app/pcm-core-api .
COPY --from=builder /app/etc/pcm.yaml .
ENV TZ=Asia/Shanghai
EXPOSE 8999
ENTRYPOINT ./pcm-core-api --f pcm.yaml

View File

@ -1,8 +1,21 @@
api-gen:
goctl api go -api desc/pcm.api -dir . -style gozero --home ../deploy/goctl
pcm-core-api:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-core-api adaptor/PCM-CORE/api/pcm.go
Generate-AMD64:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-coordinator-api pcm.go
pcm-core-rpc:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-core-rpc adaptor/PCM-CORE/rpc/pcmcore.go
Generate-ARM64:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -o pcm-coordinator-api pcm.go
pcm-ac-rpc:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-ac adaptor/PCM-HPC/PCM-AC/rpc/hpcac.go
pcm-kubenative-rpc:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-kubenative adaptor/PCM-K8S/PCM-K8S-NATIVE/rpc/pcmkubenative.go
pcm-modelarts-rpc:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-modelarts adaptor/PCM-AI/PCM-MODELARTS/rpc/pcmmodelarts.go
pcm-ceph-rpc:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-ceph adaptor/PCM-STORAGE/PCM-CEPH/rpc/pcmceph.go
all-build: pcm-core-rpc pcm-core-api pcm-ac-rpc pcm-kubenative-rpc pcm-modelarts-rpc pcm-ceph-rpc
.PHONY: pcm-core-rpc pcm-core-api pcm-ac-rpc pcm-kubenative-rpc pcm-modelarts-rpc pcm-ceph-rpc

View File

@ -1,6 +1,4 @@
<div style="text-align:center">
<img src="https://www.gitlink.org.cn/images/avatars/Organization/123822?t=1689062058" alt="PCM" style="float:center" />
</div>
![PCM](https://www.gitlink.org.cn/images/avatars/Organization/123822?t=1689062058)
<p align="center">
<a href="https://www.gitlink.org.cn/JointCloud/pcm-coordinator/tree/master/docs">Docs</a> |
<a href="https://www.gitlink.org.cn/JointCloud/pcm-coordinator/tree/master/docs">简体中文</a> |
@ -9,32 +7,35 @@
## What is Jointcloud and PCM
Jointcloud Cooperation Environment (JCCE) comprises Distributed Cloud Trading, Distributed Cloud Community, Distributed Cloud Supervision, and a Blockchain-based Distributed Accounting System. JCCE, with its supporting technologies related to information and value exchange, facilitates breaking the information asymmetry among participants in cloud collaboration. It creates a win-win opportunity for all involved parties and provides robust support for innovative business models in the cloud collaboration computing environment.
&emsp;&emsp;Jointcloud Cooperation Environment (JCCE) comprises Distributed Cloud Trading, Distributed Cloud Community, Distributed Cloud Supervision, and a Blockchain-based Distributed Accounting System. JCCE, with its supporting technologies related to information and value exchange, facilitates breaking the information asymmetry among participants in cloud collaboration. It creates a win-win opportunity for all involved parties and provides robust support for innovative business models in the cloud collaboration computing environment.
The vision of the Peer Cooperation Mechanism (PCM) is to build a set of collaboration mechanisms in the cloud environment where all service providers and demand-side entities can autonomously participate, achieve peer-to-peer transactions, and establish efficient connections and invocations in a non-intrusive manner. PCM focuses more on collaboration among clouds rather than individual clouds themselves.
&emsp;&emsp;The vision of the Peer Cooperation Mechanism (PCM) is to build a set of collaboration mechanisms in the cloud environment where all service providers and demand-side entities can autonomously participate, achieve peer-to-peer transactions, and establish efficient connections and invocations in a non-intrusive manner. PCM focuses more on collaboration among clouds rather than individual clouds themselves.
PCM is built upon a standardized software-defined framework. Cloud service providers with physical cloud resources can autonomously define PCM rule frameworks. Other entities adhering to these rule frameworks can then participate in collaborative transactions. Subsequently, tailored virtual private clouds can be created for domain-specific applications, meeting the diverse requirements of various cloud participants, such as central, edge, and terminal infrastructure, enabling them to directly participate in collaboration and transactions.
&emsp;&emsp;PCM is built upon a standardized software-defined framework. Cloud service providers with physical cloud resources can autonomously define PCM rule frameworks. Other entities adhering to these rule frameworks can then participate in collaborative transactions. Subsequently, tailored virtual private clouds can be created for domain-specific applications, meeting the diverse requirements of various cloud participants, such as central, edge, and terminal infrastructure, enabling them to directly participate in collaboration and transactions.
## Real-world Issues Addressed by PCM:
- **Performance Improvement**
Developers in the cloud collaboration environment experience performance enhancement upon joining the PCM framework. They can generate code for the internal functionality structure and most specification definitions using descriptive language, allowing them to focus on business logic development without concerning themselves with underlying management functions. The framework offers features such as microservices management, multi-language code generation, and model bridging, reducing coding workload and entry barriers while improving efficiency.
- **Performance Improvement**:
Developers in the cloud collaboration environment experience performance enhancement upon joining the PCM framework. They can generate code for the internal functionality structure and most specification definitions using descriptive language, allowing them to focus on business logic development without concerning themselves with underlying management functions. The framework offers features such as microservices management, multi-language code generation, and model bridging, reducing coding workload and entry barriers while improving efficiency.
- **Platform Lock-in Resolution**
The PCM effectively addresses platform lock-in issues through multi-cloud adaptation, standardized interfaces, and abstraction layers. This enables cross-platform operations, deployment, and interaction. Standardized interfaces simplify the work for developers, lowering the risk of platform lock-in.
- **Platform Lock-in Resolution**:
The PCM effectively addresses platform lock-in issues through multi-cloud adaptation, standardized interfaces, and abstraction layers. This enables cross-platform operations, deployment, and interaction. Standardized interfaces simplify the work for developers, lowering the risk of platform lock-in.
- **Reduced Code Development Complexity**
The PCM development framework lowers the complexity of development by providing structured development patterns, ready-made components, and documentation support. Developers of different skill levels can collaborate more fairly. The framework can save approximately 50% of development time, with junior programmers completing tasks that originally required one person-month in about 15 person-days. Features such as automatic generation tools, code templates, and component reuse allow developers to focus more on business logic implementation. There is no need for additional training of advanced developers, saving time, and reducing labor costs while improving the return on investment.
- **Reduced Code Development Complexity**:
The PCM development framework lowers the complexity of development by providing structured development patterns, ready-made components, and documentation support. Developers of different skill levels can collaborate more fairly. The framework can save approximately 50% of development time, with junior programmers completing tasks that originally required one person-month in about 15 person-days. Features such as automatic generation tools, code templates, and component reuse allow developers to focus more on business logic implementation. There is no need for additional training of advanced developers, saving time, and reducing labor costs while improving the return on investment.
- **Reduced Code Development Workload**
The PCM framework offers automation features and code generation tools, reducing manual code writing and improving development speed and code quality. With the framework's auto-generation tools, over half of the code is generated, achieving a low code rate of approximately 63%. Developers primarily work on writing descriptive language files to generate the basic structure and then adjust and write logic functions. This enables teams to deliver products more quickly, iterate based on business optimization and user feedback, and be more agile.
- **Reduced Code Development Workload**:
   The PCM framework offers automation features and code generation tools, reducing manual code writing and improving development speed and code quality. With the framework's auto-generation tools, over half of the code is generated, achieving a low code rate of approximately 63%. Developers primarily work on writing descriptive language files to generate the basic structure and then adjust and write logic functions. This enables teams to deliver products more quickly, iterate based on business optimization and user feedback, and be more agile.
## Architecture
The Coordinator is the core component of the framework, providing heterogeneous abstraction for different Participant-side technology stacks. The framework, oriented towards the user side, primarily involves two major functionalities: resource changes (task submission) and centralized display. After task submission, PCM achieves dynamic task flow through a scheduling center deployed on cloud computing, intelligent computing, and supercomputing clouds. In the centralized display section, PCM mainly collects and aggregates information about resources and tasks from multiple Participant services through Tracker and actively reported by the Participant side. It provides users with a standardized unified interface. Users can view the information provided by PCM on the frontend page or directly access data through the interface.
&emsp;&emsp;The Coordinator is the core component of the framework, providing heterogeneous abstraction for different Participant-side technology stacks. The framework, oriented towards the user side, primarily involves two major functionalities: resource changes (task submission) and centralized display. After task submission, PCM achieves dynamic task flow through a scheduling center deployed on cloud computing, intelligent computing, and supercomputing clouds. In the centralized display section, PCM mainly collects and aggregates information about resources and tasks from multiple Participant services through Tracker and actively reported by the Participant side. It provides users with a standardized unified interface. Users can view the information provided by PCM on the frontend page or directly access data through the interface.
![PCM架构](docs/images/arch-eng.png)
## PCM deploy
@ -42,22 +43,22 @@ The Coordinator is the core component of the framework, providing heterogeneous
The development environment for PCM requires the installation of Go version 1.18 or above. Please refer to the following instructions to locally start the Kubernetes-related services.
The command to fetch the project is as follows:
```bash
```
git clone https://gitlink.org.cn/JointCloud/pcm-coordinator.git
```
After executing the following command, the Kubernetes RPC service will be launched locally. For its specific functionalities, please refer to the description in the architecture design mentioned earlier.
``` bash
&emsp;&emsp;After executing the following command, the Kubernetes RPC service will be launched locally. For its specific functionalities, please refer to the description in the architecture design mentioned earlier.
```
# get required packages
go mod tidy
# run rpc service
go run pcm-coordinator/rpc/pcmcore.go
```
```
#### coordinator-api
The template for the configuration content of the API service is as follows, where the config information for each Participant (P-side) can be configured as needed based on the actual situation.
``` bash
&emsp;&emsp;The template for the configuration content of the API service is as follows, where the config information for each Participant (P-side) can be configured as needed based on the actual situation.
```
Name: pcm.core.api
Host: 0.0.0.0
Port: 8999
@ -76,22 +77,22 @@ THRpcConf:
#modelarts rpc
ModelArtsRpcConf:
Endpoints: - 127.0.0.1:2002NonBlock: true
```
After executing the following command, the Kubernetes API service will be launched locally. Once the service is started, users can make HTTP requests to its interfaces for various functional calls.
``` bash
```
&emsp;&emsp;After executing the following command, the Kubernetes API service will be launched locally. Once the service is started, users can make HTTP requests to its interfaces for various functional calls.
```
# get required packages
go mod tidy
# run rpc service
go run pcm-coordinator/api/pcm.go
```
```
## Upcoming Plans
- Pluginization of Scheduling Algorithms and Definition of Basic Resource Templates.
- Fundamental Definition of Resource Operation Types.
- Rapid Development Mode.
- Implementation of First-level Scheduling.
- Pluginization of Scheduling Algorithms and Definition of Basic Resource Templates
- Fundamental Definition of Resource Operation Types
- Rapid Development Mode
- Implementation of First-level Scheduling
## JoinContribute
We look forward to your opinions and contributions. Welcome all friends to provide corrections and improvements to the project, collectively building an efficient and stable cloud collaboration mechanism.
&emsp;&emsp;We look forward to your opinions and contributions. Welcome all friends to provide corrections and improvements to the project, collectively building an efficient and stable cloud collaboration mechanism.

40
api/Dockerfile Normal file
View File

@ -0,0 +1,40 @@
FROM golang:1.21.2-alpine3.18 AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED 0
ENV GOARCH amd64
ENV GOPROXY https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories && \
apk update --no-cache && apk add --no-cache tzdata
WORKDIR /app
ADD go.mod .
ADD go.sum .
RUN go mod download
COPY . .
COPY api/etc/ /app/
RUN go build -o pcm-coordinator-api /app/api/pcm.go
FROM alpine:3.16.2
WORKDIR /app
#修改alpine源为上海交通大学
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories && \
apk update && \
apk upgrade && \
apk add --no-cache ca-certificates && update-ca-certificates && \
apk add --update tzdata && \
rm -rf /var/cache/apk/*
COPY --from=builder /app/pcm-coordinator-api .
COPY api/etc/pcm.yaml .
ENV TZ=Asia/Shanghai
EXPOSE 8999
ENTRYPOINT ./pcm-coordinator-api -f pcm.yaml

8
api/Makefile Normal file
View File

@ -0,0 +1,8 @@
api-gen:
goctl api go -api desc/pcm.api -dir . -style gozero --home ../deploy/goctl
Generate-AMD64:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-coordinator-api pcm.go
Generate-ARM64:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -o pcm-coordinator-api pcm.go

182
api/client/types.go Normal file
View File

@ -0,0 +1,182 @@
package client
import (
"database/sql"
"time"
)
type PullTaskInfoReq struct {
AdapterId int64 `form:"adapterId"`
}
type PullTaskInfoResp struct {
HpcInfoList []*HpcInfo `json:"HpcInfoList,omitempty"`
CloudInfoList []*CloudInfo `json:"CloudInfoList,omitempty"`
AiInfoList []*AiInfo `json:"AiInfoList,omitempty"`
VmInfoList []*VmInfo `json:"VmInfoList,omitempty"`
}
type PushTaskInfoReq struct {
AdapterId int64 `json:"adapterId"`
HpcInfoList []*HpcInfo `json:"HpcInfoList,omitempty,optional"`
CloudInfoList []*CloudInfo `json:"CloudInfoList,omitempty,optional"`
AiInfoList []*AiInfo `json:"AiInfoList,omitempty,optional"`
VmInfoList []*VmInfo `json:"VmInfoList,omitempty,optional"`
}
type PushTaskInfoResp struct {
Code int64 `json:"code"`
Msg string `json:"msg"`
}
type PushResourceInfoReq struct {
AdapterId int64 `json:"adapterId"`
ResourceStats []ResourceStats `json:"resourceStats"`
}
type PushResourceInfoResp struct {
Code int64 `json:"code"`
Msg string `json:"msg"`
}
type NoticeInfo struct {
AdapterId int64 `json:"adapterId"`
AdapterName string `json:"adapterName"`
ClusterId int64 `json:"clusterId"`
ClusterName string `json:"clusterName"`
NoticeType string `json:"noticeType"`
TaskName string `json:"taskName"`
Incident string `json:"incident"`
CreatedTime time.Time `json:"createdTime"`
}
type ListNoticeReq struct {
}
type ListNoticeResp struct {
Code int64 `json:"code"`
Msg string `json:"msg"`
Data []NoticeInfo `json:"data"`
}
type PushNoticeReq struct {
NoticeInfo NoticeInfo `json:"noticeInfo"`
}
type PushNoticeResp struct {
Code int64 `json:"code"`
Msg string `json:"msg"`
}
type HpcInfo struct {
Id int64 `json:"id"` // id
TaskId int64 `json:"task_id"` // 任务id
JobId string `json:"job_id"` // 作业id(在第三方系统中的作业id)
AdapterId int64 `json:"adapter_id"` // 执行任务的适配器id
ClusterId int64 `json:"cluster_id"` // 执行任务的集群id
ClusterType string `json:"cluster_type"` // 执行任务的集群类型
Name string `json:"name"` // 名称
Status string `json:"status"` // 状态
CmdScript string `json:"cmd_script"`
StartTime string `json:"start_time"` // 开始时间
RunningTime int64 `json:"running_time"` // 运行时间
DerivedEs string `json:"derived_es"`
Cluster string `json:"cluster"`
BlockId int64 `json:"block_id"`
AllocNodes int64 `json:"alloc_nodes"`
AllocCpu int64 `json:"alloc_cpu"`
CardCount int64 `json:"card_count"` // 卡数
Version string `json:"version"`
Account string `json:"account"`
WorkDir string `json:"work_dir"` // 工作路径
AssocId int64 `json:"assoc_id"`
ExitCode int64 `json:"exit_code"`
WallTime string `json:"wall_time"` // 最大运行时间
Result string `json:"result"` // 运行结果
DeletedAt sql.NullTime `json:"deleted_at"` // 删除时间
YamlString string `json:"yaml_string"`
AppType string `json:"app_type"` // 应用类型
AppName string `json:"app_name"` // 应用名称
Queue string `json:"queue"` // 队列名称
SubmitType string `json:"submit_type"` // cmd命令行模式
NNode string `json:"n_node"` // 节点个数当指定该参数时GAP_NODE_STRING必须为""
StdOutFile string `json:"std_out_file"` // 工作路径/std.err.%j
StdErrFile string `json:"std_err_file"` // 工作路径/std.err.%j
StdInput string `json:"std_input"`
Environment string `json:"environment"`
DeletedFlag int64 `json:"deleted_flag"` // 是否删除0-否1-是)
CreatedBy int64 `json:"created_by"` // 创建人
CreatedTime time.Time `json:"created_time"` // 创建时间
UpdatedBy int64 `json:"updated_by"` // 更新人
UpdatedTime time.Time `json:"updated_time"` // 更新时间
}
type CloudInfo struct {
Participant int64 `json:"participant,omitempty"`
Id int64 `json:"id,omitempty"`
TaskId int64 `json:"taskId,omitempty"`
ApiVersion string `json:"apiVersion,omitempty"`
Kind string `json:"kind,omitempty"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
StartTime string `json:"startTime,omitempty"`
RunningTime int64 `json:"runningTime,omitempty"`
Result string `json:"result,omitempty"`
YamlString string `json:"yamlString,omitempty"`
}
type AiInfo struct {
ParticipantId int64 `json:"participantId,omitempty"`
TaskId int64 `json:"taskId,omitempty"`
ProjectId string `json:"project_id,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
StartTime string `json:"startTime,omitempty"`
RunningTime int64 `json:"runningTime,omitempty"`
Result string `json:"result,omitempty"`
JobId string `json:"jobId,omitempty"`
CreateTime string `json:"createTime,omitempty"`
ImageUrl string `json:"imageUrl,omitempty"`
Command string `json:"command,omitempty"`
FlavorId string `json:"flavorId,omitempty"`
SubscriptionId string `json:"subscriptionId,omitempty"`
ItemVersionId string `json:"itemVersionId,omitempty"`
}
type VmInfo struct {
ParticipantId int64 `json:"participantId,omitempty"`
TaskId int64 `json:"taskId,omitempty"`
Name string `json:"name,omitempty"`
FlavorRef string `json:"flavor_ref,omitempty"`
ImageRef string `json:"image_ref,omitempty"`
NetworkUuid string `json:"network_uuid,omitempty"`
BlockUuid string `json:"block_uuid,omitempty"`
SourceType string `json:"source_type,omitempty"`
DeleteOnTermination bool `json:"delete_on_termination,omitempty"`
Status string `json:"Status,omitempty"`
StartTime string `json:"startTime,omitempty"`
}
type ResourceStats struct {
ClusterId int64 `json:"clusterId"`
Name string `json:"name"`
CpuCoreAvail int64 `json:"cpuCoreAvail"`
CpuCoreTotal int64 `json:"cpuCoreTotal"`
MemAvail float64 `json:"memAvail"`
MemTotal float64 `json:"memTotal"`
DiskAvail float64 `json:"diskAvail"`
DiskTotal float64 `json:"diskTotal"`
GpuAvail int64 `json:"gpuAvail"`
CardsAvail []*Card `json:"cardsAvail"`
CpuCoreHours float64 `json:"cpuCoreHours"`
Balance float64 `json:"balance"`
}
type Card struct {
Platform string `json:"platform"`
Type string `json:"type"`
Name string `json:"name"`
TOpsAtFp16 float64 `json:"TOpsAtFp16"`
CardHours float64 `json:"cardHours"`
CardNum int32 `json:"cardNum"`
}

View File

@ -720,7 +720,6 @@ type (
Offset int32 `form:"offSet,optional"`
/****************智算类型 ModelartsType parmas ********************/
ModelArtsType string `form:"modelArtsType,optional"`
Platform string `form:"platform,optional"`
}
)
type ListServicesResp {
@ -1150,7 +1149,7 @@ type (
ProjectId string `json:"projectId" copier:"ProjectId"`
Param ListNotebookParam `json:"param,optional" copier:"Param"`
/****************智算类型 ModelartsType parmas ********************/
Platform string `json:"platform,optional"`
ModelArtsType string `json:"modelArtsType,optional"`
}
ListNotebookResp {
Current int32 `json:"current,omitempty" copier:"Current"`
@ -1206,7 +1205,7 @@ type (
ProjectId string `json:"projectId" copier:"ProjectId"`
Param StartNotebookParam `json:"param" copier:"Param"`
/****************智算类型 ModelartsType parmas ********************/
Platform string `json:"platform,optional"`
ModelArtsType string `json:"modelArtsType,optional"`
}
StartNotebookResp {
NotebookResp NotebookResp `json:"notebookResp" copier:"NotebookResp"`
@ -1698,51 +1697,6 @@ PayloadCreateTrainJob{
jobId string `json:"jobId,optional"`
}
********************/
/******************Ai Center overview*************************/
CenterOverviewResp {
CenterNum int32 `json:"totalCenters,optional"`
TaskNum int32 `json:"totalTasks,optional"`
CardNum int32 `json:"totalCards,optional"`
PowerInTops float64 `json:"totalPower,optional"`
}
CenterQueueingResp {
Current []*CenterQueue `json:"current,optional"`
History []*CenterQueue `json:"history,optional"`
}
CenterQueue {
Name string `json:"name,optional"`
QueueingNum int32 `json:"num,optional"`
}
CenterListResp {
List []*AiCenter `json:"centerList,optional"`
}
AiCenter {
Name string `json:"name,optional"`
StackName string `json:"stack,optional"`
Version string `json:"version,optional"`
}
CenterTaskListResp {
List []*AiTask `json:"taskList,optional"`
}
AiTask {
Name string `json:"name,optional"`
status string `json:"status,optional"`
Cluster string `json:"cluster,optional"`
Card string `json:"card,optional"`
TimeElapsed int32 `json:"elapsed,optional"`
}
TrainingTaskStatResp {
Running int32 `json:"running"`
Total int32 `json:"total"`
}
)
/******************create TrainIngJob end*************************/
@ -1823,15 +1777,4 @@ service AICore-api {
get /getVisualizationJob (GetVisualizationJobReq) returns (GetVisualizationJobResp)
@handler createVisualizationJobHandler
post /CreateVisualizationJob (CreateVisualizationJobReq) returns (CreateVisualizationJobResp)
}*/
type (
ChatReq{
id uint `json:"id,string"`
Method string `json:"method,optional"`
ReqData map[string]interface{} `json:"reqData"`
}
ChatResult{
Resuluts string `json:"results,optional"`
}
)
}*/

View File

@ -59,9 +59,9 @@ type (
Type int64 `json:"type"` // 租户所属(0数算1超算2智算
DeletedFlag int64 `json:"deletedFlag"` // 是否删除
CreatedBy int64 `json:"createdBy"` // 创建人
CreateTime string `json:"createdTime"` // 创建时间
CreatedTime string `json:"createdTime"` // 创建时间
UpdatedBy int64 `json:"updatedBy"` // 更新人
UpdateTime string `json:"updated_time"` // 更新时间
UpdatedTime string `json:"updated_time"` // 更新时间
}
UpdateTenantReq {
@ -115,6 +115,6 @@ type Cloud {
StartTime string `json:"startTime"` // 开始时间
RunningTime int64 `json:"runningTime"` // 运行时长
CreatedBy int64 `json:"createdBy"` // 创建人
CreateTime string `json:"createdTime"` // 创建时间
CreatedTime string `json:"createdTime"` // 创建时间
Result string `json:"result"`
}

1096
api/desc/core/pcm-core.api Normal file

File diff suppressed because it is too large Load Diff

137
api/desc/hpc/pcm-hpc.api Normal file
View File

@ -0,0 +1,137 @@
syntax = "v1"
info(
title: "type title here"
desc: "type desc here"
author: "type author here"
email: "type email here"
version: "type version here"
)
type (
commitHpcTaskReq {
Name string `json:"name"` // paratera:jobName
Description string `json:"description,optional"`
TenantId int64 `json:"tenantId,optional"`
TaskId int64 `json:"taskId,optional"`
AdapterId string `json:"adapterId,optional"`
MatchLabels map[string]string `json:"matchLabels,optional"`
CardCount int64 `json:"cardCount,optional"`
WorkDir string `json:"workDir,optional"` //paratera:workingDir
WallTime string `json:"wallTime,optional"`
CmdScript string `json:"cmdScript,optional"` // paratera:bootScript
AppType string `json:"appType,optional"`
AppName string `json:"appName,optional"` // paratera:jobGroupName ac:appname
Queue string `json:"queue,optional"`
NNode string `json:"nNode,optional"`
SubmitType string `json:"submitType,optional"`
StdOutFile string `json:"stdOutFile,optional"`
StdErrFile string `json:"stdErrFile,optional"`
StdInput string `json:"stdInput,optional"`
Environment map[string]string `json:"environment,optional"`
ClusterType string `json:"clusterType,optional"`
}
commitHpcTaskResp {
TaskId int64 `json:"taskId"`
Code int32 `json:"code"`
Msg string `json:"msg"`
}
)
type (
hpcOverViewReq {
}
hpcOverViewResp {
Code int32 `json:"code"`
Msg string `json:"msg"`
Data HPCOverView `json:"data"`
}
HPCOverView {
AdapterCount int32 `json:"adapterCount"`
StackCount int32 `json:"stackCount"`
ClusterCount int32 `json:"clusterCount"`
TaskCount int32 `json:"taskCount"`
}
)
type (
hpcAdapterSummaryReq {
}
hpcAdapterSummaryResp {
Code int32 `json:"code"`
Msg string `json:"msg"`
Data []HPCAdapterSummary `json:"data"`
}
HPCAdapterSummary {
AdapterName string `json:"adapterName"`
StackCount int32 `json:"stackCount"`
ClusterCount int32 `json:"clusterCount"`
TaskCount int32 `json:"taskCount"`
}
)
type (
hpcJobReq {
}
hpcJobResp {
Code int32 `json:"code"`
Msg string `json:"msg"`
Data []Job `json:"data"`
}
Job {
JobName string `json:"jobName"`
JobDesc string `json:"jobDesc"`
SubmitTime string `json:"submitTime"`
JobStatus string `json:"jobStatus"`
AdapterName string `json:"adapterName"`
ClusterName string `json:"clusterName"`
ClusterType string `json:"clusterType"`
}
)
type (
hpcResourceReq {
}
hpcResourceResp {
Code int32 `json:"code"`
Msg string `json:"msg"`
Data HPCResource `json:"data"`
}
HPCResource {
GPUCardsTotal float64 `json:"gpuCoresTotal"`
CPUCoresTotal float64 `json:"cpuCoresTotal"`
RAMTotal float64 `json:"ramTotal"`
GPUCardsUsed float64 `json:"gpuCoresUsed"`
CPUCoresUsed float64 `json:"cpuCoresUsed"`
RAMUsed float64 `json:"ramUsed"`
GPURate float64 `json:"gpuRate"`
CPURate float64 `json:"cpuRate"`
RAMRate float64 `json:"ramRate"`
}
)
type QueueAssetsResp {
QueueAssets []QueueAsset `json:"queueAsset"`
}
type QueueAsset {
TenantName string `json:"tenantName"` //租户名称
ParticipantId int64 `json:"participantId"`
AclHosts string `json:"aclHosts"` // 可用节点,多个节点用逗号隔开
QueNodes string `json:"queNodes"` //队列节点总数
QueMinNodect string `json:"queMinNodect,omitempty"` //队列最小节点数
QueMaxNgpus string `json:"queMaxNgpus,omitempty"` //队列最大GPU卡数
QueMaxPPN string `json:"queMaxPPN,omitempty"` //使用该队列作业最大CPU核心数
QueChargeRate string `json:"queChargeRate,omitempty"` //费率
QueMaxNcpus string `json:"queMaxNcpus,omitempty"` //用户最大可用核心数
QueMaxNdcus string `json:"queMaxNdcus,omitempty"` //队列总DCU卡数
QueueName string `json:"queueName,omitempty"` //队列名称
QueMinNcpus string `json:"queMinNcpus,omitempty"` //队列最小CPU核数
QueFreeNodes string `json:"queFreeNodes,omitempty"` //队列空闲节点数
QueMaxNodect string `json:"queMaxNodect,omitempty"` //队列作业最大节点数
QueMaxGpuPN string `json:"queMaxGpuPN,omitempty"` //队列单作业最大GPU卡数
QueMaxWalltime string `json:"queMaxWalltime,omitempty"` //队列最大运行时间
QueMaxDcuPN string `json:"queMaxDcuPN,omitempty"` //队列单作业最大DCU卡数
QueFreeNcpus string `json:"queFreeNcpus"` //队列空闲cpu数
QueNcpus string `json:"queNcpus"` //队列cpu数
}

View File

@ -11,12 +11,6 @@ type CreateAlertRuleReq {
AlertType string `json:"alertType"`
}
type DeleteAlertRuleReq {
Id int64 `form:"id"`
ClusterName string `form:"clusterName"`
Name string `form:"name"`
}
type (
AlertRulesReq {
AlertType string `form:"alertType"`
@ -79,35 +73,11 @@ type (
)
type (
adapterInfoReq {
adapterInfoReq{
clusterId string `form:"clusterId"`
}
adapterInfoResp {
adapterInfoResp{
name string `json:"name"`
version string `json:"version"`
}
)
type (
scheduleSituationResp {
nodes []NodeRegion `json:"nodes"`
links []Link `json:"links"`
categories []Category `json:"categories"`
}
NodeRegion {
id string `json:"id"`
name string `json:"name"`
category int `json:"category"`
value int `json:"value"`
}
Link {
source string `json:"source"`
target string `json:"target"`
}
Category {
name string `json:"name"`
}
)

View File

@ -10,7 +10,6 @@ import (
"storelink/pcm-storelink.api"
"schedule/pcm-schedule.api"
"monitoring/pcm-monitoring.api"
"inference/inference.api"
)
info(
@ -43,10 +42,6 @@ service pcm {
@handler commitVmTaskHandler
post /core/commitVmTask (commitVmTaskReq) returns (commitVmTaskResp)
@doc "异步提交智算任务"
@handler asynCommitAiTaskHandler
post /core/asynCommitAiTask (asynCommitAiTaskReq) returns (asynCommitAiTaskResp)
@doc "删除任务"
@handler deleteTaskHandler
delete /core/deleteTask/:id (deleteTaskReq)
@ -55,6 +50,10 @@ service pcm {
@handler TaskListHandler
get /core/taskList (taskListReq) returns (taskListResp)
@doc "查询任务详情"
@handler TaskDetailHandler
get /core/taskDetail/:taskId (taskDetailReq) returns (taskDetailResp)
@doc "任务概览"
@handler JobTotalHandler
get /core/jobTotal returns (jobTotalResp)
@ -137,43 +136,7 @@ service pcm {
@doc "Statistical task status"
@handler countTaskStatus
get /core/task/countTaskStatus returns (TaskStatusResp)
@doc "Home Page Overview"
@handler homeOverviewHandler
get /core/homeOverview (HomeOverviewReq) returns (HomeOverviewResp)
@doc "task details"
@handler taskDetails
get /core/task/details (FId) returns (TaskDetailsResp)
@doc "Get Public Image"
@handler getPublicImageHandler
get /core/getPublicImage (PublicImageReq) returns (PublicImageResp)
@doc "Get Public Flavor"
@handler getPublicFlavorHandler
get /core/getPublicFlavor (PublicFlavorReq) returns (PublicFlavorResp)
@doc "Get Public Network"
@handler getPublicNetworkHandler
get /core/getPublicNetwork (PublicNetworkReq) returns (PublicNetworkResp)
@doc "screen"
@handler getDomainResourceHandler
get /core/getDomainResource returns (DomainResourceResp)
@doc "screen"
@handler getScreenInfoHandler
get /core/getScreenInfo returns (ScreenInfoResp)
@doc "screen"
@handler getScreenChartHandler
get /core/getScreenChart returns (ScreenChartResp)
@doc "根据集群id获取集群信息"
@handler getClusterByIdHandler
get /core/getClusterById (getClusterByIdReq) returns (getClusterByIdResp)
get /core/task/countTaskStatus () returns (TaskStatusResp)
}
//hpc二级接口
@ -205,14 +168,6 @@ service pcm {
@doc "超算查询资产列表"
@handler queueAssetsHandler
get /hpc/queueAssets returns (QueueAssetsResp)
@doc "删除超算任务"
@handler cancelJobHandler
delete /hpc/cancelJob (cancelJobReq)
@doc "查看job状态"
@handler jobInfoHandler
get /hpc/jobInfo (jobInfoReq) returns (jobInfoResp)
}
//cloud二级接口
@ -241,16 +196,21 @@ service pcm {
@handler deleteClusterHandler
post /cloud/deleteCluster (deleteClusterReq) returns (CloudResp)
@doc "触发租户更新"
@handler noticeTenantHandler
get /cloud/noticeTenant returns (CloudResp)
@doc "租户更新"
@handler updateTenantHandler
post /cloud/updateTenant (UpdateTenantReq) returns (CloudResp)
@doc "Obtain cluster list information according to adapterId"
@handler getClusterListHandler
get /core/clusterList (getClusterListReq) returns (getClusterListResp)
@doc "Create cloud computing common tasks"
@handler commitGeneralTask
post /cloud/task/create (GeneralTaskReq)
@handler podLogs
post /cloud/pod/logs (PodLogsReq) returns (string)
post /cloud/task/create (GeneralTaskReq) returns ()
}
//智算二级接口
@ -259,26 +219,6 @@ service pcm {
group: ai
)
service pcm {
@doc "训练任务统计"
@handler trainingTaskStatHandler
get /ai/trainingTaskStat returns (TrainingTaskStatResp)
@doc "智算中心概览"
@handler getCenterOverviewHandler
get /ai/getCenterOverview returns (CenterOverviewResp)
@doc "智算中心排队状况"
@handler getCenterQueueingHandler
get /ai/getCenterQueueing returns (CenterQueueingResp)
@doc "智算中心列表"
@handler getCenterListHandler
get /ai/getCenterList returns (CenterListResp)
@doc "智算中心任务列表"
@handler getCenterTaskListHandler
get /ai/getCenterTaskList returns (CenterTaskListResp)
@doc "查询数据集列表"
@handler listDataSetHandler
get /ai/listDataSet/:projectId (DataSetReq) returns (DataSetResp)
@ -397,13 +337,7 @@ service pcm {
@doc "创建虚拟化任务"
@handler createVisualizationJobHandler
post /ai/CreateVisualizationJob (CreateVisualizationJobReq) returns (CreateVisualizationJobResp)
/******************Visualization Job Method start*************************/
/***********chat***********/
@doc "文本识别"
@handler ChatHandler
post /ai/chat (ChatReq) returns (ChatResult)
/******chat end***********/
}
//screen接口
@ -412,13 +346,44 @@ service pcm {
group: storage
)
service pcm {
@doc "存储概览"
@handler screenStorageHandler
get /storage/screenStorage (StorageScreenReq) returns (StorageScreenResp)
@doc "日常算力查询"
@handler dailyPowerScreenHandler
get /storage/dailyPowerScreen returns (DailyPowerScreenResp)
get /storage/dailyPowerScreen (DailyPowerScreenReq) returns (DailyPowerScreenResp)
@doc "算力中心算力情况"
@handler perCenterComputerPowersHandler
get /storage/perCenterComputerPowers returns (PerCenterComputerPowersResp)
get /storage/perCenterComputerPowers (PerCenterComputerPowersReq) returns (PerCenterComputerPowersResp)
}
//镜像接口
@server(
prefix: pcm/v1
group: image
)
service pcm {
@doc "镜像上传"
@handler uploadHandler
post /upload
@doc "镜像分块"
@handler chunkHandler
post /chunk
@doc "查询镜像列表"
@handler imageListHandler
get /image/list returns (imageListResp)
@doc "数据集检查"
@handler dataSetCheckHandler
get /dataSet/check/:fileMd5 (checkReq) returns (checkResp)
@doc "上传数据集"
@handler uploadDataSetHandler
post /dataSet/upload
}
//openstack 接口
@ -851,6 +816,49 @@ service pcm {
get /storelink/getResourceSpecs (GetResourceSpecsReq) returns (GetResourceSpecsResp)
}
// 接口
@server(
prefix: pcm/v1
group: apps
)
service pcm {
@doc "应用列表"
@handler AppListHandler
get /apps/list (AppListReq) returns (AppListResp)
@doc "获取应用分发详情"
@handler AppDetailHandler
get /apps/distribute/:appName (AppDetailReq) returns (AppDetailResp)
@doc "应用pods列表"
@handler AppPodsHandler
get /apps/pods/:appName (AppDetailReq) returns (AppDetailResp)
@doc "获取应用详情"
@handler GetAppByAppName
get /apps/getAppByAppName/:appName (AppDetailReq) returns (AppTaskResp)
@doc "删除应用"
@handler DeleteAppByAppName
delete /apps/deleteApp (DeleteAppReq) returns (DeleteAppResp)
@doc "更新应用"
@handler UpdateAppByAppName
put /apps/updateApp (DeleteAppReq) returns (AppTaskResp)
@doc "重启应用"
@handler RestartAppByAppName
put /apps/restartApp (DeleteAppReq) returns (AppResp)
@doc "暂停应用"
@handler PauseAppByAppName
put /apps/pauseApp (DeleteAppReq) returns (AppResp)
@doc "启动应用"
@handler StartAppByAppName
put /apps/startApp (DeleteAppReq) returns (AppResp)
}
// 接口
@server(
prefix: pcm/v1
@ -892,9 +900,6 @@ service pcm {
@handler GetClusterSumHandler
get /adapter/clusterSum (clusterSumReq) returns (clusterSumReqResp)
@handler GetAdapterInfoHandler
get /adapter/getAdapterInfo (adapterInfoNameReq) returns (adapterInfoNameReqResp)
}
@server(
@ -922,78 +927,6 @@ service pcm {
@handler ScheduleSubmitHandler
post /schedule/submit (ScheduleReq) returns (ScheduleResp)
@handler ScheduleGetOverviewHandler
post /schedule/getOverview returns (ScheduleOverviewResp)
@handler DownloadAlgothmCodeHandler
get /schedule/downloadAlgorithmCode (DownloadAlgorithmCodeReq) returns (DownloadAlgorithmCodeResp)
@handler UploadAlgothmCodeHandler
post /schedule/uploadAlgorithmCode (UploadAlgorithmCodeReq) returns (UploadAlgorithmCodeResp)
@handler GetComputeCardsByClusterHandler
get /schedule/getComputeCardsByCluster/:adapterId/:clusterId (GetComputeCardsByClusterReq) returns (GetComputeCardsByClusterResp)
@handler GetClusterBalanceByIdHandler
get /schedule/getClusterBalanceById/:adapterId/:clusterId (GetClusterBalanceByIdReq) returns (GetClusterBalanceByIdResp)
}
@server(
prefix: pcm/v1
group: inference
)
service pcm {
@handler TextToTextInferenceHandler
post /inference/text (TextToTextInferenceReq) returns (TextToTextInferenceResp)
@handler ImageInferenceHandler
post /inference/images (ImageInferenceReq) returns (ImageInferenceResp)
@handler ModelTypesHandler
get /inference/modelTypes returns (ModelTypesResp)
@handler InstanceCenterHandler
get /inference/instanceCenter (InstanceCenterReq) returns (InstanceCenterResp)
@handler ModelNamesByTypeHandler
get /inference/modelNames (ModelNamesReq) returns (ModelNamesResp)
@handler InferenceTaskDetailHandler
get /inference/taskDetail (InferenceTaskDetailReq) returns (InferenceTaskDetailResp)
@handler DeployInstanceListHandler
get /inference/deployInstanceList (DeployInstanceListReq) returns (DeployInstanceListResp)
@handler StartDeployInstanceListHandler
post /inference/startDeployInstance (StartDeployInstanceReq) returns (StartDeployInstanceResp)
@handler StopDeployInstanceHandler
post /inference/stopDeployInstance (StopDeployInstanceReq) returns (StopDeployInstanceResp)
@handler DeployInstanceStatHandler
get /inference/deployInstanceStat (DeployInstanceStatReq) returns (DeployInstanceStatResp)
@handler InferenceTaskStatHandler
get /inference/taskStat (InferenceTaskStatReq) returns (InferenceTaskStatResp)
@handler StartAllByDeployTaskId
post /inference/startAll (StartAllByDeployTaskIdReq) returns (StartAllByDeployTaskIdResp)
@handler StopAllByDeployTaskId
post /inference/stopAll (StopAllByDeployTaskIdReq) returns (StopAllByDeployTaskIdResp)
@handler GetRunningInstanceById
get /inference/getRunningInstanceById (GetRunningInstanceReq) returns (GetRunningInstanceResp)
@handler GetDeployTasksByType
get /inference/getDeployTasksByType (GetDeployTasksByTypeReq) returns (GetDeployTasksByTypeResp)
@handler CreateDeployTask
post /inference/createDeployTask (CreateDeployTaskReq) returns (CreateDeployTaskResp)
@handler GetAdaptersByModel
get /inference/getAdaptersByModel (GetAdaptersByModelReq) returns (GetAdaptersByModelResp)
}
@server(
@ -1047,9 +980,6 @@ service pcm {
@handler alertRulesHandler
get /monitoring/alert/rule (AlertRulesReq) returns (AlertRulesResp)
@handler DeleteAlertRuleHandler
delete /monitoring/alert/rule (DeleteAlertRuleReq)
@doc "cluster resource load"
@handler clustersLoadHandler
get /monitoring/cluster/load (clustersLoadReq) returns (clustersLoadResp)
@ -1071,7 +1001,4 @@ service pcm {
@handler adapterInfoHandler
get /monitoring/adapter/info (adapterInfoReq) returns (adapterInfoResp)
@handler scheduleSituationHandler
get /monitoring/schedule/situation returns (scheduleSituationResp)
}

View File

@ -0,0 +1,84 @@
syntax = "v1"
info(
title: "schedule"
desc: "调度服务"
author: "tzwang"
email: "tzwang@qq.com"
)
type (
ScheduleReq {
AiOption *AiOption `json:"aiOption,optional"`
}
ScheduleResp {
Results []*ScheduleResult `json:"results"`
}
ScheduleResult {
ClusterId string `json:"clusterId"`
TaskId string `json:"taskId"`
Strategy string `json:"strategy"`
Replica int32 `json:"replica"`
Msg string `json:"msg"`
}
AiOption {
TaskName string `json:"taskName"`
AdapterId string `json:"adapterId"`
AiClusterIds []string `json:"aiClusterIds"`
ResourceType string `json:"resourceType"`
Tops float64 `json:"Tops,optional"`
TaskType string `json:"taskType"`
Datasets string `json:"datasets"`
Algorithm string `json:"algorithm"`
Strategy string `json:"strategy"`
StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
Params []string `json:"params,optional"`
Envs []string `json:"envs,optional"`
Cmd string `json:"cmd,optional"`
}
AiResourceTypesResp {
ResourceTypes []string `json:"resourceTypes"`
}
AiTaskTypesResp {
TaskTypes []string `json:"taskTypes"`
}
AiDatasetsReq {
AdapterId string `path:"adapterId"`
}
AiDatasetsResp {
Datasets []string `json:"datasets"`
}
AiStrategyResp {
Strategies []string `json:"strategies"`
}
AiAlgorithmsReq {
AdapterId string `path:"adapterId"`
ResourceType string `path:"resourceType"`
TaskType string `path:"taskType"`
Dataset string `path:"dataset"`
}
AiAlgorithmsResp {
Algorithms []string `json:"algorithms"`
}
AiJobLogReq {
AdapterId string `path:"adapterId"`
ClusterId string `path:"clusterId"`
TaskId string `path:"taskId"`
instanceNum string `path:"instanceNum"`
}
AiJobLogResp {
Log string `json:"log"`
}
)

View File

@ -52,14 +52,46 @@ type (
/******************screen computing power Start*************************/
type (
DailyPowerScreenReq {
}
DailyPowerScreenResp {
// DailyComputerPowers []DailyComputerPowers `json:"dailyComputerPowers" copier:"DailyComputerPowers"`
chart interface{} `json:"chart"`
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
DailyComputerPowers []DailyComputerPowers `json:"dailyComputerPowers" copier:"DailyComputerPowers"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"ErrorMsg,omitempty"`
}
DailyComputerPowers {
Date string `json:"date" copier:"Date"`
ComputerPower float32 `json:"computerPower" copier:"ComputerPower"`
}
)
type (
PerCenterComputerPowersReq {
}
PerCenterComputerPowersResp {
chart interface{} `json:"chart"`
TotalSize int32 `json:"totalSize" copier:"TotalSize"`
PerCenterComputerPowers []PerCenterComputerPowers `json:"perCenterComputerPowers" copier:"PerCenterComputerPowers"`
AccOtJobInfo AccOtJobInfo `json:"accOtJobInfo" copier:"AccOtJobInfo"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"ErrorMsg,omitempty"`
}
PerCenterComputerPowers {
CenterName string `json:"centerName" copier:"CenterName"`
ComputerPower float32 `json:"computerPower" copier:"ComputerPower"`
JobCount int32 `json:"jobCount" copier:"JobCount"`
CenterId string `json:"centerId" copier:"CenterId"`
}
AccOtJobInfo {
AccRunSec int32 `json:"accRunSec" copier:"AccRunSec"`
AccCardRunSec float32 `json:"accCardRunSec" copier:"AccCardRunSec"`
AccOtJobNum int32 `json:"accOtJobNum" copier:"AccOtJobNum"`
}
)

100
api/etc/pcm.yaml Normal file
View File

@ -0,0 +1,100 @@
Name: pcm.core.api
Host: 0.0.0.0
Port: 8999
Timeout: 50000
DB:
DataSource: root:uJpLd6u-J?HC1@(10.206.0.12:3306)/pcm?parseTime=true&loc=Local
# DataSource: root:uJpLd6u-J?HC1@(47.92.88.143:3306)/pcm?parseTime=true&loc=Local
Redis:
Host: 10.206.0.12:6379
Pass: redisPW123
Monitoring:
PromUrl: http://47.92.39.128:30877
AlertUrl: 47.92.39.128:32243
# k8s rpc
K8sNativeConf:
# target: nacos://10.206.0.12:8848/pcm.kubenative.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
Endpoints:
- 127.0.0.1:2003
NonBlock: true
#rpc
THRpcConf:
target: nacos://10.206.0.12:8848/pcm.th.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
# Endpoints:
# - 127.0.0.1:8888
NonBlock: true
#rpc
ModelArtsRpcConf:
target: nacos://10.206.0.12:8848/pcm.modelarts.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
# Endpoints:
# - 127.0.0.1:8888
NonBlock: true
#rpc
ModelArtsImgRpcConf:
target: nacos://10.206.0.12:8848/pcm.modelarts.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
# Endpoints:
# - 127.0.0.1:8888
NonBlock: true
#rpc
ACRpcConf:
target: nacos://10.206.0.12:8848/pcm.ac.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
# Endpoints:
# - 127.0.0.1:8888
NonBlock: true
Timeout: 20000
#rpc
CephRpcConf:
# target: nacos://10.206.0.12:8848/pcm.ceph.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
Endpoints:
- pcm-participant-ceph-service:2008
NonBlock: true
Timeout: 50000
OctopusRpcConf:
target: nacos://10.206.0.12:8848/pcm.octopus.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
# Endpoints:
# - 127.0.0.1:8888
NonBlock: true
Timeout: 20000
OpenstackRpcConf:
# target: nacos://10.206.0.12:8848/pcm.openstack.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
Endpoints:
- 127.0.0.1:2010
NonBlock: true
Timeout: 20000
# core rpc
PcmCoreRpcConf:
# target: nacos://10.206.0.12:8848/pcm.core.rpc?timeout=30s&namespaceid=test&groupname=DEFAULT_GROUP&appName=pcm.core.api
Endpoints:
- pcm-core-rpc:2004
NonBlock: true
Timeout: 20000
NexusUrl: http://10.101.15.175:8081
JccScheduleUrl: http://jcce-schedule-service:8082
MinioConf:
Secret: minio_xnu122@_
AccessKey: minioadmin
Endpoint: http://121.89.220.60:9000
RegistryConf:
Username: jointcloudNudt
Password: Nudt@123
SnowflakeConf:
MachineId: 1

View File

@ -33,16 +33,21 @@ type Config struct {
THRpcConf zrpc.RpcClientConf
ModelArtsRpcConf zrpc.RpcClientConf
ModelArtsImgRpcConf zrpc.RpcClientConf
CephRpcConf zrpc.RpcClientConf
OpenstackRpcConf zrpc.RpcClientConf
OctopusRpcConf zrpc.RpcClientConf
PcmCoreRpcConf zrpc.RpcClientConf
MinioConf struct {
JccScheduleUrl string
MinioConf struct {
Secret string
AccessKey string
Endpoint string
}
RegistryConf struct {
Username string
Password string
}
SnowflakeConf SnowflakeConf
Monitoring Monitoring
}

32
api/internal/cron/cron.go Normal file
View File

@ -0,0 +1,32 @@
/*
Copyright (c) [2023] [pcm]
[pcm-coordinator] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
package cron
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
)
func AddCronGroup(svc *svc.ServiceContext) {
// 删除三天前的监控信息
svc.Cron.AddFunc("0 0 0 ? * ? ", func() {
ClearMetricsData(svc)
})
// 同步任务信息到core端
svc.Cron.AddFunc("*/5 * * * * ?", func() {
SyncParticipantRpc(svc)
})
}

View File

@ -0,0 +1,28 @@
/*
Copyright (c) [2023] [pcm]
[pcm-coordinator] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
package cron
import (
"github.com/rs/zerolog/log"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
)
func ClearMetricsData(svc *svc.ServiceContext) {
tx := svc.DbEngin.Where("DATE(created_time) <= DATE(DATE_SUB(NOW(),INTERVAL 3 DAY))").Delete(&models.ScNodeAvailInfo{})
if tx.Error != nil {
log.Err(tx.Error)
}
}

View File

@ -0,0 +1,41 @@
/*
Copyright (c) [2023] [pcm]
[pcm-coordinator] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
package cron
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/constants"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/tracker"
)
func SyncParticipantRpc(svc *svc.ServiceContext) {
// 查询出所有p端信息
var participants []*models.ScParticipantPhyInfo
svc.DbEngin.Where("type in (?)", []string{constants.CLOUD, constants.SEALOS}).Find(&participants)
if len(participants) != 0 {
for _, participant := range participants {
if len(participant.MetricsUrl) != 0 {
// 初始化p端prometheus client
promClient, err := tracker.NewPrometheus(participant.MetricsUrl)
if err != nil {
return
}
svc.MonitorClient[participant.Id] = promClient
}
}
}
}

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package adapters
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package ai
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/ai"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func AppDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppDetailReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewAppDetailLogic(r.Context(), svcCtx)
resp, err := l.AppDetail(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func AppListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppListReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewAppListLogic(r.Context(), svcCtx)
resp, err := l.AppList(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func AppPodsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppDetailReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewAppPodsLogic(r.Context(), svcCtx)
resp, err := l.AppPods(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func DeleteAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewDeleteAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.DeleteAppByAppName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func GetAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppDetailReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewGetAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.GetAppByAppName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func PauseAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewPauseAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.PauseAppByAppName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func RestartAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewRestartAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.RestartAppByAppName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func StartAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewStartAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.StartAppByAppName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -0,0 +1,24 @@
package apps
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func UpdateAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := apps.NewUpdateAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.UpdateAppByAppName(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -1,8 +1,8 @@
package cloud
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -0,0 +1,25 @@
package cloud
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
)
func ClusterInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterInfoReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := cloud.NewClusterInfoLogic(r.Context(), svcCtx)
resp, err := l.ClusterInfo(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -2,9 +2,9 @@ package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -0,0 +1,16 @@
package cloud
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func NoticeTenantHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := cloud.NewNoticeTenantLogic(r.Context(), svcCtx)
resp, err := l.NoticeTenant()
result.HttpResult(r, w, resp, err)
}
}

View File

@ -2,9 +2,9 @@ package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -0,0 +1,24 @@
package cloud
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)
func UpdateTenantHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.UpdateTenantReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}
l := cloud.NewUpdateTenantLogic(r.Context(), svcCtx)
resp, err := l.UpdateTenant(&req)
result.HttpResult(r, w, resp, err)
}
}

View File

@ -1,8 +1,8 @@
package core
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package core
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package core
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -1,8 +1,8 @@
package core
import (
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

View File

@ -2,9 +2,9 @@ package core
import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

Some files were not shown because too many files have changed in this diff Show More