rename directory

This commit is contained in:
450705171@qq.com 2023-02-15 16:53:55 +08:00
parent dacda8d981
commit f91f026c96
42 changed files with 64 additions and 989 deletions

View File

@ -3,9 +3,9 @@ package handler
import (
"net/http"
"PCM/app/slurm/slurmCore/api/internal/logic"
"PCM/app/slurm/slurmCore/api/internal/svc"
"PCM/app/slurm/slurmCore/api/internal/types"
"PCM/adaptor/slurm/slurmCore/api/internal/logic"
"PCM/adaptor/slurm/slurmCore/api/internal/svc"
"PCM/adaptor/slurm/slurmCore/api/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)

View File

@ -4,7 +4,7 @@ package handler
import (
"net/http"
"PCM/app/slurm/slurmCore/api/internal/svc"
"PCM/adaptor/slurm/slurmCore/api/internal/svc"
"github.com/zeromicro/go-zero/rest"
)

View File

@ -1,15 +1,15 @@
package logic
import (
"PCM/app/slurm/slurmTianhe/rpc/slurmTianhe"
"PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe"
"PCM/common/tool"
"PCM/common/xerr"
"context"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"PCM/app/slurm/slurmCore/api/internal/svc"
"PCM/app/slurm/slurmCore/api/internal/types"
"PCM/adaptor/slurm/slurmCore/api/internal/svc"
"PCM/adaptor/slurm/slurmCore/api/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)

View File

@ -1,9 +1,9 @@
package svc
import (
"PCM/app/slurm/slurmCore/api/internal/config"
"PCM/app/slurm/slurmShuguang/rpc/slurmshuguangclient"
"PCM/app/slurm/slurmTianhe/rpc/slurmtianheclient"
"PCM/adaptor/slurm/slurmCore/api/internal/config"
"PCM/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient"
"PCM/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient"
"github.com/zeromicro/go-zero/zrpc"
)

View File

@ -4,16 +4,15 @@ import (
"flag"
"fmt"
"PCM/app/slurm/slurmCore/api/internal/config"
"PCM/app/slurm/slurmCore/api/internal/handler"
"PCM/app/slurm/slurmCore/api/internal/svc"
"PCM/adaptor/slurm/slurmCore/api/internal/config"
"PCM/adaptor/slurm/slurmCore/api/internal/handler"
"PCM/adaptor/slurm/slurmCore/api/internal/svc"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
)
// C:\Users\Administrator\GolandProjects\PCM\app\slurm\slurmShuguang\rpc
var configFile = flag.String("f", "app/slurm/slurmCore/api/etc/slurmcore-api.yaml", "the config file")
var configFile = flag.String("f", "etc/slurmcore-api.yaml", "the config file")
func main() {
flag.Parse()

View File

@ -1,7 +1,7 @@
package logic
import (
"PCM/app/slurm/slurmShuguang/rpc/internal/util"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/util"
"context"
"io"
"log"
@ -10,8 +10,8 @@ import (
"strconv"
"time"
"PCM/app/slurm/slurmShuguang/rpc/internal/svc"
"PCM/app/slurm/slurmShuguang/rpc/slurmShuguang"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc"
"PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang"
"github.com/bitly/go-simplejson"
"github.com/zeromicro/go-zero/core/logx"
)

View File

@ -6,9 +6,9 @@ package server
import (
"context"
"PCM/app/slurm/slurmShuguang/rpc/internal/logic"
"PCM/app/slurm/slurmShuguang/rpc/internal/svc"
"PCM/app/slurm/slurmShuguang/rpc/slurmShuguang"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/logic"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc"
"PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang"
)
type SlurmShuguangServer struct {

View File

@ -1,6 +1,6 @@
package svc
import "PCM/app/slurm/slurmCore/rpc/domain/internal/config"
import "PCM/adaptor/slurm/slurmShuguang/rpc/internal/config"
type ServiceContext struct {
Config config.Config

View File

@ -1,12 +1,12 @@
package util
import (
"PCM/app/slurm/slurmShuguang/rpc/internal/config"
"PCM/app/slurm/slurmShuguang/rpc/internal/svc"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/config"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc"
"encoding/json"
"flag"
"github.com/zeromicro/go-zero/core/conf"
"io/ioutil"
"io"
"log"
"net/http"
"time"
@ -69,7 +69,7 @@ type dataToken struct {
Token string `json:"token"`
}
var configFile = flag.String("flll", "C:\\Users\\Administrator\\GolandProjects\\PCM\\app\\slurm\\slurmShuguang\\rpc\\etc\\slurmshuguang.yaml", "the config file")
var configFile = flag.String("flll", "etc/slurmshuguang.yaml", "the config file")
func GetClusterId() int {
httpClient := http.Client{Timeout: time.Duration(3) * time.Second}
@ -96,13 +96,18 @@ func GetClusterId() int {
if err != nil {
log.Fatal(err)
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
var res cluster
err = json.Unmarshal(body, &res)
if err != nil {
log.Panicln(err)
}
defer resp.Body.Close()
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil {
}
}(resp.Body)
var id int
for _, datum := range res.Data {
if datum.JobManagerType == "SLURM" {
@ -131,14 +136,19 @@ func GetToken() string {
log.Fatal(err)
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
var rd resultToken
err = json.Unmarshal(body, &rd)
if err != nil {
log.Panicln(err)
}
defer resp.Body.Close()
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil {
}
}(resp.Body)
for _, datum := range rd.Data {
if datum.ClusterId == "0" {
return datum.Token
@ -163,12 +173,17 @@ func GetTokenState(token string) bool {
if err != nil {
log.Fatal(err)
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
err = json.Unmarshal(body, &res)
if err != nil {
log.Panicln(err)
}
defer resp.Body.Close()
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil {
}
}(resp.Body)
if res.Code == "0" {
return true
} else if res.Code == "10008" {

View File

@ -4,10 +4,10 @@ import (
"flag"
"fmt"
"PCM/app/slurm/slurmShuguang/rpc/internal/config"
"PCM/app/slurm/slurmShuguang/rpc/internal/server"
"PCM/app/slurm/slurmShuguang/rpc/internal/svc"
"PCM/app/slurm/slurmShuguang/rpc/slurmShuguang"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/config"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/server"
"PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc"
"PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/core/service"
@ -16,7 +16,7 @@ import (
"google.golang.org/grpc/reflection"
)
var configFile = flag.String("f", "C:\\Users\\Administrator\\GolandProjects\\PCM\\app\\slurm\\slurmShuguang\\rpc\\etc\\slurmshuguang.yaml", "the config file")
var configFile = flag.String("f", "etc/slurmshuguang.yaml", "the config file")
func main() {
flag.Parse()

View File

@ -6,7 +6,7 @@ package slurmshuguangclient
import (
"context"
"PCM/app/slurm/slurmShuguang/rpc/slurmShuguang"
"PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"

View File

@ -70,8 +70,8 @@ import "C"
import (
"context"
"PCM/app/slurm/slurmTianhe/rpc/internal/svc"
"PCM/app/slurm/slurmTianhe/rpc/slurmTianhe"
"PCM/adaptor/slurm/slurmTianhe/rpc/internal/svc"
"PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe"
"github.com/zeromicro/go-zero/core/logx"
)

View File

@ -6,9 +6,9 @@ package server
import (
"context"
"PCM/app/slurm/slurmTianhe/rpc/internal/logic"
"PCM/app/slurm/slurmTianhe/rpc/internal/svc"
"PCM/app/slurm/slurmTianhe/rpc/slurmTianhe"
"PCM/adaptor/slurm/slurmTianhe/rpc/internal/logic"
"PCM/adaptor/slurm/slurmTianhe/rpc/internal/svc"
"PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe"
)
type SlurmTianheServer struct {

View File

@ -1,6 +1,6 @@
package svc
import "PCM/app/slurm/slurmShuguang/rpc/internal/config"
import "PCM/adaptor/slurm/slurmTianhe/rpc/internal/config"
type ServiceContext struct {
Config config.Config

View File

@ -4,10 +4,10 @@ import (
"flag"
"fmt"
"PCM/app/slurm/slurmTianhe/rpc/internal/config"
"PCM/app/slurm/slurmTianhe/rpc/internal/server"
"PCM/app/slurm/slurmTianhe/rpc/internal/svc"
"PCM/app/slurm/slurmTianhe/rpc/slurmTianhe"
"PCM/adaptor/slurm/slurmTianhe/rpc/internal/config"
"PCM/adaptor/slurm/slurmTianhe/rpc/internal/server"
"PCM/adaptor/slurm/slurmTianhe/rpc/internal/svc"
"PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/core/service"
@ -16,7 +16,7 @@ import (
"google.golang.org/grpc/reflection"
)
var configFile = flag.String("f", "app/slurm/slurmTianhe/rpc/etc/slurmtianhe.yaml", "the config file")
var configFile = flag.String("f", "etc/slurmtianhe.yaml", "the config file")
func main() {
flag.Parse()

View File

@ -6,7 +6,7 @@ package slurmtianheclient
import (
"context"
"PCM/app/slurm/slurmTianhe/rpc/slurmTianhe"
"PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"

View File

@ -1,39 +0,0 @@
package main
import (
"flag"
"fmt"
"PCM/app/slurm/slurmCore/rpc/domain/domain"
"PCM/app/slurm/slurmCore/rpc/domain/internal/config"
"PCM/app/slurm/slurmCore/rpc/domain/internal/server"
"PCM/app/slurm/slurmCore/rpc/domain/internal/svc"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/core/service"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
var configFile = flag.String("f", "etc/domain.yaml", "the config file")
func main() {
flag.Parse()
var c config.Config
conf.MustLoad(*configFile, &c)
ctx := svc.NewServiceContext(c)
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
domain.RegisterDomainSvcServer(grpcServer, server.NewDomainSvcServer(ctx))
if c.Mode == service.DevMode || c.Mode == service.TestMode {
reflection.Register(grpcServer)
}
})
defer s.Stop()
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
s.Start()
}

View File

@ -1,40 +0,0 @@
syntax = "proto3";
package list;
option go_package = "./domain";
message Domain {
string domainName = 1;
string softStack = 2;
int32 slurmNum = 3;
int32 interfaceCount = 4;
int32 runningJobs = 5;
}
message DomainSummary {
int32 domainCount = 1;
int32 softStackCount = 2;
}
message listDomainRequest {
}
message listDomainResponse {
int32 code = 1;
string msg = 2;
repeated Domain domains = 3;
}
message getDomainSummaryRequest {
}
message getDomainSummaryResponse {
int32 code = 1;
string msg = 2;
DomainSummary domainSummary = 3;
}
service domainSvc {
rpc listDomain(listDomainRequest) returns(listDomainResponse);
rpc getDomainSummary(getDomainSummaryRequest) returns(getDomainSummaryResponse);
}

View File

@ -1,543 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.19.4
// source: domain.proto
package domain
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Domain struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DomainName string `protobuf:"bytes,1,opt,name=domainName,proto3" json:"domainName,omitempty"`
SoftStack string `protobuf:"bytes,2,opt,name=softStack,proto3" json:"softStack,omitempty"`
SlurmNum int32 `protobuf:"varint,3,opt,name=slurmNum,proto3" json:"slurmNum,omitempty"`
InterfaceCount int32 `protobuf:"varint,4,opt,name=interfaceCount,proto3" json:"interfaceCount,omitempty"`
RunningJobs int32 `protobuf:"varint,5,opt,name=runningJobs,proto3" json:"runningJobs,omitempty"`
}
func (x *Domain) Reset() {
*x = Domain{}
if protoimpl.UnsafeEnabled {
mi := &file_domain_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Domain) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Domain) ProtoMessage() {}
func (x *Domain) ProtoReflect() protoreflect.Message {
mi := &file_domain_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Domain.ProtoReflect.Descriptor instead.
func (*Domain) Descriptor() ([]byte, []int) {
return file_domain_proto_rawDescGZIP(), []int{0}
}
func (x *Domain) GetDomainName() string {
if x != nil {
return x.DomainName
}
return ""
}
func (x *Domain) GetSoftStack() string {
if x != nil {
return x.SoftStack
}
return ""
}
func (x *Domain) GetSlurmNum() int32 {
if x != nil {
return x.SlurmNum
}
return 0
}
func (x *Domain) GetInterfaceCount() int32 {
if x != nil {
return x.InterfaceCount
}
return 0
}
func (x *Domain) GetRunningJobs() int32 {
if x != nil {
return x.RunningJobs
}
return 0
}
type DomainSummary struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DomainCount int32 `protobuf:"varint,1,opt,name=domainCount,proto3" json:"domainCount,omitempty"`
SoftStackCount int32 `protobuf:"varint,2,opt,name=softStackCount,proto3" json:"softStackCount,omitempty"`
}
func (x *DomainSummary) Reset() {
*x = DomainSummary{}
if protoimpl.UnsafeEnabled {
mi := &file_domain_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DomainSummary) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DomainSummary) ProtoMessage() {}
func (x *DomainSummary) ProtoReflect() protoreflect.Message {
mi := &file_domain_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DomainSummary.ProtoReflect.Descriptor instead.
func (*DomainSummary) Descriptor() ([]byte, []int) {
return file_domain_proto_rawDescGZIP(), []int{1}
}
func (x *DomainSummary) GetDomainCount() int32 {
if x != nil {
return x.DomainCount
}
return 0
}
func (x *DomainSummary) GetSoftStackCount() int32 {
if x != nil {
return x.SoftStackCount
}
return 0
}
type ListDomainRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListDomainRequest) Reset() {
*x = ListDomainRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_domain_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListDomainRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListDomainRequest) ProtoMessage() {}
func (x *ListDomainRequest) ProtoReflect() protoreflect.Message {
mi := &file_domain_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListDomainRequest.ProtoReflect.Descriptor instead.
func (*ListDomainRequest) Descriptor() ([]byte, []int) {
return file_domain_proto_rawDescGZIP(), []int{2}
}
type ListDomainResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
Domains []*Domain `protobuf:"bytes,3,rep,name=domains,proto3" json:"domains,omitempty"`
}
func (x *ListDomainResponse) Reset() {
*x = ListDomainResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_domain_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListDomainResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListDomainResponse) ProtoMessage() {}
func (x *ListDomainResponse) ProtoReflect() protoreflect.Message {
mi := &file_domain_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListDomainResponse.ProtoReflect.Descriptor instead.
func (*ListDomainResponse) Descriptor() ([]byte, []int) {
return file_domain_proto_rawDescGZIP(), []int{3}
}
func (x *ListDomainResponse) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
func (x *ListDomainResponse) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *ListDomainResponse) GetDomains() []*Domain {
if x != nil {
return x.Domains
}
return nil
}
type GetDomainSummaryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetDomainSummaryRequest) Reset() {
*x = GetDomainSummaryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_domain_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetDomainSummaryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetDomainSummaryRequest) ProtoMessage() {}
func (x *GetDomainSummaryRequest) ProtoReflect() protoreflect.Message {
mi := &file_domain_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetDomainSummaryRequest.ProtoReflect.Descriptor instead.
func (*GetDomainSummaryRequest) Descriptor() ([]byte, []int) {
return file_domain_proto_rawDescGZIP(), []int{4}
}
type GetDomainSummaryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
DomainSummary *DomainSummary `protobuf:"bytes,3,opt,name=domainSummary,proto3" json:"domainSummary,omitempty"`
}
func (x *GetDomainSummaryResponse) Reset() {
*x = GetDomainSummaryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_domain_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetDomainSummaryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetDomainSummaryResponse) ProtoMessage() {}
func (x *GetDomainSummaryResponse) ProtoReflect() protoreflect.Message {
mi := &file_domain_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetDomainSummaryResponse.ProtoReflect.Descriptor instead.
func (*GetDomainSummaryResponse) Descriptor() ([]byte, []int) {
return file_domain_proto_rawDescGZIP(), []int{5}
}
func (x *GetDomainSummaryResponse) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
func (x *GetDomainSummaryResponse) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *GetDomainSummaryResponse) GetDomainSummary() *DomainSummary {
if x != nil {
return x.DomainSummary
}
return nil
}
var File_domain_proto protoreflect.FileDescriptor
var file_domain_proto_rawDesc = []byte{
0x0a, 0x0c, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04,
0x6c, 0x69, 0x73, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x66, 0x74, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x66, 0x74, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x1a, 0x0a,
0x08, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73,
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4a,
0x6f, 0x62, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x6d,
0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x64, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x53, 0x74,
0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e,
0x73, 0x6f, 0x66, 0x74, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x13,
0x0a, 0x11, 0x6c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x62, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12,
0x26, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07,
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x67, 0x65, 0x74, 0x44, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x22, 0x7b, 0x0a, 0x18, 0x67, 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53,
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6d, 0x73, 0x67, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75,
0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x69,
0x73, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79,
0x52, 0x0d, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x32,
0x9f, 0x01, 0x0a, 0x09, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x76, 0x63, 0x12, 0x3f, 0x0a,
0x0a, 0x6c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x6c, 0x69,
0x73, 0x74, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x6c, 0x69, 0x73, 0x74,
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51,
0x0a, 0x10, 0x67, 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61,
0x72, 0x79, 0x12, 0x1d, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x44, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x44, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_domain_proto_rawDescOnce sync.Once
file_domain_proto_rawDescData = file_domain_proto_rawDesc
)
func file_domain_proto_rawDescGZIP() []byte {
file_domain_proto_rawDescOnce.Do(func() {
file_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_domain_proto_rawDescData)
})
return file_domain_proto_rawDescData
}
var file_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_domain_proto_goTypes = []interface{}{
(*Domain)(nil), // 0: list.Domain
(*DomainSummary)(nil), // 1: list.DomainSummary
(*ListDomainRequest)(nil), // 2: list.listDomainRequest
(*ListDomainResponse)(nil), // 3: list.listDomainResponse
(*GetDomainSummaryRequest)(nil), // 4: list.getDomainSummaryRequest
(*GetDomainSummaryResponse)(nil), // 5: list.getDomainSummaryResponse
}
var file_domain_proto_depIdxs = []int32{
0, // 0: list.listDomainResponse.domains:type_name -> list.Domain
1, // 1: list.getDomainSummaryResponse.domainSummary:type_name -> list.DomainSummary
2, // 2: list.domainSvc.listDomain:input_type -> list.listDomainRequest
4, // 3: list.domainSvc.getDomainSummary:input_type -> list.getDomainSummaryRequest
3, // 4: list.domainSvc.listDomain:output_type -> list.listDomainResponse
5, // 5: list.domainSvc.getDomainSummary:output_type -> list.getDomainSummaryResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_domain_proto_init() }
func file_domain_proto_init() {
if File_domain_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Domain); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DomainSummary); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_domain_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDomainRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_domain_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDomainResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_domain_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetDomainSummaryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_domain_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetDomainSummaryResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_domain_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_domain_proto_goTypes,
DependencyIndexes: file_domain_proto_depIdxs,
MessageInfos: file_domain_proto_msgTypes,
}.Build()
File_domain_proto = out.File
file_domain_proto_rawDesc = nil
file_domain_proto_goTypes = nil
file_domain_proto_depIdxs = nil
}

View File

@ -1,141 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: domain.proto
package domain
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DomainSvcClient is the client API for DomainSvc service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type DomainSvcClient interface {
ListDomain(ctx context.Context, in *ListDomainRequest, opts ...grpc.CallOption) (*ListDomainResponse, error)
GetDomainSummary(ctx context.Context, in *GetDomainSummaryRequest, opts ...grpc.CallOption) (*GetDomainSummaryResponse, error)
}
type domainSvcClient struct {
cc grpc.ClientConnInterface
}
func NewDomainSvcClient(cc grpc.ClientConnInterface) DomainSvcClient {
return &domainSvcClient{cc}
}
func (c *domainSvcClient) ListDomain(ctx context.Context, in *ListDomainRequest, opts ...grpc.CallOption) (*ListDomainResponse, error) {
out := new(ListDomainResponse)
err := c.cc.Invoke(ctx, "/list.domainSvc/listDomain", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainSvcClient) GetDomainSummary(ctx context.Context, in *GetDomainSummaryRequest, opts ...grpc.CallOption) (*GetDomainSummaryResponse, error) {
out := new(GetDomainSummaryResponse)
err := c.cc.Invoke(ctx, "/list.domainSvc/getDomainSummary", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DomainSvcServer is the server API for DomainSvc service.
// All implementations must embed UnimplementedDomainSvcServer
// for forward compatibility
type DomainSvcServer interface {
ListDomain(context.Context, *ListDomainRequest) (*ListDomainResponse, error)
GetDomainSummary(context.Context, *GetDomainSummaryRequest) (*GetDomainSummaryResponse, error)
mustEmbedUnimplementedDomainSvcServer()
}
// UnimplementedDomainSvcServer must be embedded to have forward compatible implementations.
type UnimplementedDomainSvcServer struct {
}
func (UnimplementedDomainSvcServer) ListDomain(context.Context, *ListDomainRequest) (*ListDomainResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListDomain not implemented")
}
func (UnimplementedDomainSvcServer) GetDomainSummary(context.Context, *GetDomainSummaryRequest) (*GetDomainSummaryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDomainSummary not implemented")
}
func (UnimplementedDomainSvcServer) mustEmbedUnimplementedDomainSvcServer() {}
// UnsafeDomainSvcServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DomainSvcServer will
// result in compilation errors.
type UnsafeDomainSvcServer interface {
mustEmbedUnimplementedDomainSvcServer()
}
func RegisterDomainSvcServer(s grpc.ServiceRegistrar, srv DomainSvcServer) {
s.RegisterService(&DomainSvc_ServiceDesc, srv)
}
func _DomainSvc_ListDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListDomainRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainSvcServer).ListDomain(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/list.domainSvc/listDomain",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainSvcServer).ListDomain(ctx, req.(*ListDomainRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DomainSvc_GetDomainSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDomainSummaryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainSvcServer).GetDomainSummary(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/list.domainSvc/getDomainSummary",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainSvcServer).GetDomainSummary(ctx, req.(*GetDomainSummaryRequest))
}
return interceptor(ctx, in, info, handler)
}
// DomainSvc_ServiceDesc is the grpc.ServiceDesc for DomainSvc service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DomainSvc_ServiceDesc = grpc.ServiceDesc{
ServiceName: "list.domainSvc",
HandlerType: (*DomainSvcServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "listDomain",
Handler: _DomainSvc_ListDomain_Handler,
},
{
MethodName: "getDomainSummary",
Handler: _DomainSvc_GetDomainSummary_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "domain.proto",
}

View File

@ -1,47 +0,0 @@
// Code generated by goctl. DO NOT EDIT.
// Source: domain.proto
package domainsvc
import (
"context"
"PCM/app/slurm/slurmCore/rpc/domain/domain"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
Domain = domain.Domain
DomainSummary = domain.DomainSummary
GetDomainSummaryRequest = domain.GetDomainSummaryRequest
GetDomainSummaryResponse = domain.GetDomainSummaryResponse
ListDomainRequest = domain.ListDomainRequest
ListDomainResponse = domain.ListDomainResponse
DomainSvc interface {
ListDomain(ctx context.Context, in *ListDomainRequest, opts ...grpc.CallOption) (*ListDomainResponse, error)
GetDomainSummary(ctx context.Context, in *GetDomainSummaryRequest, opts ...grpc.CallOption) (*GetDomainSummaryResponse, error)
}
defaultDomainSvc struct {
cli zrpc.Client
}
)
func NewDomainSvc(cli zrpc.Client) DomainSvc {
return &defaultDomainSvc{
cli: cli,
}
}
func (m *defaultDomainSvc) ListDomain(ctx context.Context, in *ListDomainRequest, opts ...grpc.CallOption) (*ListDomainResponse, error) {
client := domain.NewDomainSvcClient(m.cli.Conn())
return client.ListDomain(ctx, in, opts...)
}
func (m *defaultDomainSvc) GetDomainSummary(ctx context.Context, in *GetDomainSummaryRequest, opts ...grpc.CallOption) (*GetDomainSummaryResponse, error) {
client := domain.NewDomainSvcClient(m.cli.Conn())
return client.GetDomainSummary(ctx, in, opts...)
}

View File

@ -1,6 +0,0 @@
Name: domain.rpc
ListenOn: 0.0.0.0:8080
Etcd:
Hosts:
- 127.0.0.1:2379
Key: domain.rpc

View File

@ -1,30 +0,0 @@
package logic
import (
"context"
"PCM/app/slurm/slurmCore/rpc/domain/domain"
"PCM/app/slurm/slurmCore/rpc/domain/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type GetDomainSummaryLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetDomainSummaryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetDomainSummaryLogic {
return &GetDomainSummaryLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetDomainSummaryLogic) GetDomainSummary(in *domain.GetDomainSummaryRequest) (*domain.GetDomainSummaryResponse, error) {
// todo: add your logic here and delete this line
return &domain.GetDomainSummaryResponse{}, nil
}

View File

@ -1,40 +0,0 @@
package logic
import (
"context"
"PCM/app/slurm/slurmCore/rpc/domain/domain"
"PCM/app/slurm/slurmCore/rpc/domain/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type ListDomainLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewListDomainLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListDomainLogic {
return &ListDomainLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *ListDomainLogic) ListDomain(in *domain.ListDomainRequest) (*domain.ListDomainResponse, error) {
// todo: add your logic here and delete this line
//_, err := l.svcCtx.Insert(model.Book{
// Book: in.Book,
// Price: in.Price,
//})
//if err != nil {
// return nil, err
//}
//
//return &add.AddResp{
// Ok: true,
//}, nil
return &domain.ListDomainResponse{}, nil
}

View File

@ -1,33 +0,0 @@
// Code generated by goctl. DO NOT EDIT.
// Source: domain.proto
package server
import (
"context"
"PCM/app/slurm/slurmCore/rpc/domain/domain"
"PCM/app/slurm/slurmCore/rpc/domain/internal/logic"
"PCM/app/slurm/slurmCore/rpc/domain/internal/svc"
)
type DomainSvcServer struct {
svcCtx *svc.ServiceContext
domain.UnimplementedDomainSvcServer
}
func NewDomainSvcServer(svcCtx *svc.ServiceContext) *DomainSvcServer {
return &DomainSvcServer{
svcCtx: svcCtx,
}
}
func (s *DomainSvcServer) ListDomain(ctx context.Context, in *domain.ListDomainRequest) (*domain.ListDomainResponse, error) {
l := logic.NewListDomainLogic(ctx, s.svcCtx)
return l.ListDomain(in)
}
func (s *DomainSvcServer) GetDomainSummary(ctx context.Context, in *domain.GetDomainSummaryRequest) (*domain.GetDomainSummaryResponse, error) {
l := logic.NewGetDomainSummaryLogic(ctx, s.svcCtx)
return l.GetDomainSummary(in)
}

View File

@ -1,7 +0,0 @@
package config
import "github.com/zeromicro/go-zero/zrpc"
type Config struct {
zrpc.RpcServerConf
}

View File

@ -1,13 +0,0 @@
package svc
import "PCM/app/slurm/slurmTianhe/rpc/internal/config"
type ServiceContext struct {
Config config.Config
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
}
}