♻️ refactor RegisterParticipant impl
Signed-off-by: devad <cossjie@foxmail.com> Former-commit-id: 61f39aa179f89624701fb6b90f9b3ffe34fcd444
This commit is contained in:
parent
d6d955a68c
commit
db892b8d26
2
go.mod
2
go.mod
|
@ -19,7 +19,6 @@ require (
|
||||||
gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230714013255-149a9b428b28
|
gitlink.org.cn/jcce-pcm/pcm-participant-modelarts v0.0.0-20230714013255-149a9b428b28
|
||||||
gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714012611-c66005610d0c
|
gitlink.org.cn/jcce-pcm/pcm-participant-octopus v0.0.0-20230714012611-c66005610d0c
|
||||||
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714015940-004100bfa168
|
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714015940-004100bfa168
|
||||||
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230724072501-2a0519bd57bd
|
|
||||||
google.golang.org/grpc v1.56.2
|
google.golang.org/grpc v1.56.2
|
||||||
google.golang.org/protobuf v1.31.0
|
google.golang.org/protobuf v1.31.0
|
||||||
gorm.io/driver/mysql v1.5.1
|
gorm.io/driver/mysql v1.5.1
|
||||||
|
@ -91,6 +90,7 @@ require (
|
||||||
github.com/prometheus/procfs v0.9.0 // indirect
|
github.com/prometheus/procfs v0.9.0 // indirect
|
||||||
github.com/segmentio/kafka-go v0.4.38 // indirect
|
github.com/segmentio/kafka-go v0.4.38 // indirect
|
||||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||||
|
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230725025032-ac218fa4db06 // indirect
|
||||||
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
|
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
|
||||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
|
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
|
||||||
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
|
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1039,6 +1039,10 @@ gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714015940-004100bfa168
|
||||||
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714015940-004100bfa168/go.mod h1:lY3jXmmMvC7j4Q2ogliThURWp9c1XCToSCnRkdc1aW8=
|
gitlink.org.cn/jcce-pcm/pcm-participant-slurm v0.0.0-20230714015940-004100bfa168/go.mod h1:lY3jXmmMvC7j4Q2ogliThURWp9c1XCToSCnRkdc1aW8=
|
||||||
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230724072501-2a0519bd57bd h1:A9i6TPZ58OwycgWNQpIMrjSIMK8lXmmakig7IkonrVA=
|
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230724072501-2a0519bd57bd h1:A9i6TPZ58OwycgWNQpIMrjSIMK8lXmmakig7IkonrVA=
|
||||||
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230724072501-2a0519bd57bd/go.mod h1:zTa+selMe02jZ3u6Ij1rTF2CrGd2ZqzqyMQ/FwhdpvY=
|
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230724072501-2a0519bd57bd/go.mod h1:zTa+selMe02jZ3u6Ij1rTF2CrGd2ZqzqyMQ/FwhdpvY=
|
||||||
|
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230725025032-ac218fa4db06 h1:mjt1ynoyzyowzm+pUXZKptoSHqjGyzw6uNCQzeHo1/g=
|
||||||
|
gitlink.org.cn/jcce-pcm/utils v0.0.0-20230725025032-ac218fa4db06/go.mod h1:u8PTlBpzUyOlbQJgfSiutq91q/JtrJIQiPNDe4S/pGs=
|
||||||
|
gitlink.org.cn/jcce-pcm/utils v0.0.1 h1:3PH93Z/JFTH5JRO9MFf3dD1Gnd12aGiIIViWBlQGuhE=
|
||||||
|
gitlink.org.cn/jcce-pcm/utils v0.0.1/go.mod h1:5cwaaqM0+HK5GXVbYozGlWvgwoUby0KytdvhbwQW1ks=
|
||||||
go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
|
go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
|
||||||
go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA=
|
go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA=
|
||||||
go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs=
|
go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs=
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
package model
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
|
||||||
)
|
|
||||||
|
|
||||||
var _ ScNodeLabelInfoModel = (*customScNodeLabelInfoModel)(nil)
|
|
||||||
|
|
||||||
type (
|
|
||||||
// ScNodeLabelInfoModel is an interface to be customized, add more methods here,
|
|
||||||
// and implement the added methods in customScNodeLabelInfoModel.
|
|
||||||
ScNodeLabelInfoModel interface {
|
|
||||||
scNodeLabelInfoModel
|
|
||||||
}
|
|
||||||
|
|
||||||
customScNodeLabelInfoModel struct {
|
|
||||||
*defaultScNodeLabelInfoModel
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewScNodeLabelInfoModel returns a model for the database table.
|
|
||||||
func NewScNodeLabelInfoModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) ScNodeLabelInfoModel {
|
|
||||||
return &customScNodeLabelInfoModel{
|
|
||||||
defaultScNodeLabelInfoModel: newScNodeLabelInfoModel(conn, c, opts...),
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,122 +0,0 @@
|
||||||
// Code generated by goctl. DO NOT EDIT.
|
|
||||||
|
|
||||||
package model
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"database/sql"
|
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
|
||||||
"github.com/zeromicro/go-zero/core/stringx"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
scNodeLabelInfoFieldNames = builder.RawFieldNames(&ScNodeLabelInfo{})
|
|
||||||
scNodeLabelInfoRows = strings.Join(scNodeLabelInfoFieldNames, ",")
|
|
||||||
scNodeLabelInfoRowsExpectAutoSet = strings.Join(stringx.Remove(scNodeLabelInfoFieldNames, "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
|
|
||||||
scNodeLabelInfoRowsWithPlaceHolder = strings.Join(stringx.Remove(scNodeLabelInfoFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
|
|
||||||
|
|
||||||
cachePcmScNodeLabelInfoIdPrefix = "cache:pcm:scNodeLabelInfo:id:"
|
|
||||||
)
|
|
||||||
|
|
||||||
type (
|
|
||||||
scNodeLabelInfoModel interface {
|
|
||||||
Insert(ctx context.Context, data *ScNodeLabelInfo) (sql.Result, error)
|
|
||||||
FindOne(ctx context.Context, id int64) (*ScNodeLabelInfo, error)
|
|
||||||
Update(ctx context.Context, data *ScNodeLabelInfo) error
|
|
||||||
Delete(ctx context.Context, id int64) error
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultScNodeLabelInfoModel struct {
|
|
||||||
sqlc.CachedConn
|
|
||||||
table string
|
|
||||||
}
|
|
||||||
|
|
||||||
ScNodeLabelInfo struct {
|
|
||||||
Id int64 `db:"id"` // id
|
|
||||||
Label string `db:"label"` // 类型
|
|
||||||
NodeId int64 `db:"node_id"` // 节点id
|
|
||||||
DeletedFlag int64 `db:"deleted_flag"` // 是否删除
|
|
||||||
CreatedBy sql.NullInt64 `db:"created_by"` // 创建人
|
|
||||||
CreatedTime time.Time `db:"created_time"` // 创建时间
|
|
||||||
UpdatedBy sql.NullInt64 `db:"updated_by"` // 更新人
|
|
||||||
UpdatedTime sql.NullTime `db:"updated_time"` // 更新时间
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
func newScNodeLabelInfoModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultScNodeLabelInfoModel {
|
|
||||||
return &defaultScNodeLabelInfoModel{
|
|
||||||
CachedConn: sqlc.NewConn(conn, c, opts...),
|
|
||||||
table: "`sc_node_label_info`",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) withSession(session sqlx.Session) *defaultScNodeLabelInfoModel {
|
|
||||||
return &defaultScNodeLabelInfoModel{
|
|
||||||
CachedConn: m.CachedConn.WithSession(session),
|
|
||||||
table: "`sc_node_label_info`",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) Delete(ctx context.Context, id int64) error {
|
|
||||||
pcmScNodeLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScNodeLabelInfoIdPrefix, id)
|
|
||||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
|
||||||
query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
|
|
||||||
return conn.ExecCtx(ctx, query, id)
|
|
||||||
}, pcmScNodeLabelInfoIdKey)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) FindOne(ctx context.Context, id int64) (*ScNodeLabelInfo, error) {
|
|
||||||
pcmScNodeLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScNodeLabelInfoIdPrefix, id)
|
|
||||||
var resp ScNodeLabelInfo
|
|
||||||
err := m.QueryRowCtx(ctx, &resp, pcmScNodeLabelInfoIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
|
||||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", scNodeLabelInfoRows, m.table)
|
|
||||||
return conn.QueryRowCtx(ctx, v, query, id)
|
|
||||||
})
|
|
||||||
switch err {
|
|
||||||
case nil:
|
|
||||||
return &resp, nil
|
|
||||||
case sqlc.ErrNotFound:
|
|
||||||
return nil, ErrNotFound
|
|
||||||
default:
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) Insert(ctx context.Context, data *ScNodeLabelInfo) (sql.Result, error) {
|
|
||||||
pcmScNodeLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScNodeLabelInfoIdPrefix, data.Id)
|
|
||||||
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
|
||||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?)", m.table, scNodeLabelInfoRowsExpectAutoSet)
|
|
||||||
return conn.ExecCtx(ctx, query, data.Id, data.Label, data.NodeId, data.DeletedFlag, data.CreatedBy, data.CreatedTime, data.UpdatedBy, data.UpdatedTime)
|
|
||||||
}, pcmScNodeLabelInfoIdKey)
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) Update(ctx context.Context, data *ScNodeLabelInfo) error {
|
|
||||||
pcmScNodeLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScNodeLabelInfoIdPrefix, data.Id)
|
|
||||||
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
|
||||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, scNodeLabelInfoRowsWithPlaceHolder)
|
|
||||||
return conn.ExecCtx(ctx, query, data.Label, data.NodeId, data.DeletedFlag, data.CreatedBy, data.CreatedTime, data.UpdatedBy, data.UpdatedTime, data.Id)
|
|
||||||
}, pcmScNodeLabelInfoIdKey)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) formatPrimary(primary any) string {
|
|
||||||
return fmt.Sprintf("%s%v", cachePcmScNodeLabelInfoIdPrefix, primary)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
|
||||||
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", scNodeLabelInfoRows, m.table)
|
|
||||||
return conn.QueryRowCtx(ctx, v, query, primary)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *defaultScNodeLabelInfoModel) tableName() string {
|
|
||||||
return m.table
|
|
||||||
}
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ ScParticipantLabelInfoModel = (*customScParticipantLabelInfoModel)(nil)
|
||||||
|
|
||||||
|
type (
|
||||||
|
// ScParticipantLabelInfoModel is an interface to be customized, add more methods here,
|
||||||
|
// and implement the added methods in customScParticipantLabelInfoModel.
|
||||||
|
ScParticipantLabelInfoModel interface {
|
||||||
|
scParticipantLabelInfoModel
|
||||||
|
}
|
||||||
|
|
||||||
|
customScParticipantLabelInfoModel struct {
|
||||||
|
*defaultScParticipantLabelInfoModel
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewScParticipantLabelInfoModel returns a model for the database table.
|
||||||
|
func NewScParticipantLabelInfoModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) ScParticipantLabelInfoModel {
|
||||||
|
return &customScParticipantLabelInfoModel{
|
||||||
|
defaultScParticipantLabelInfoModel: newScParticipantLabelInfoModel(conn, c, opts...),
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,123 @@
|
||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
|
||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||||
|
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||||
|
"github.com/zeromicro/go-zero/core/stringx"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
scParticipantLabelInfoFieldNames = builder.RawFieldNames(&ScParticipantLabelInfo{})
|
||||||
|
scParticipantLabelInfoRows = strings.Join(scParticipantLabelInfoFieldNames, ",")
|
||||||
|
scParticipantLabelInfoRowsExpectAutoSet = strings.Join(stringx.Remove(scParticipantLabelInfoFieldNames, "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), ",")
|
||||||
|
scParticipantLabelInfoRowsWithPlaceHolder = strings.Join(stringx.Remove(scParticipantLabelInfoFieldNames, "`id`", "`create_at`", "`create_time`", "`created_at`", "`update_at`", "`update_time`", "`updated_at`"), "=?,") + "=?"
|
||||||
|
|
||||||
|
cachePcmScParticipantLabelInfoIdPrefix = "cache:pcm:scParticipantLabelInfo:id:"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
scParticipantLabelInfoModel interface {
|
||||||
|
Insert(ctx context.Context, data *ScParticipantLabelInfo) (sql.Result, error)
|
||||||
|
FindOne(ctx context.Context, id int64) (*ScParticipantLabelInfo, error)
|
||||||
|
Update(ctx context.Context, data *ScParticipantLabelInfo) error
|
||||||
|
Delete(ctx context.Context, id int64) error
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultScParticipantLabelInfoModel struct {
|
||||||
|
sqlc.CachedConn
|
||||||
|
table string
|
||||||
|
}
|
||||||
|
|
||||||
|
ScParticipantLabelInfo struct {
|
||||||
|
Id int64 `db:"id"` // id
|
||||||
|
Label string `db:"label"` // 标签
|
||||||
|
ParticipantId int64 `db:"participant_id"` // participant id
|
||||||
|
Metadata sql.NullString `db:"metadata"` // 元数据
|
||||||
|
DeletedFlag int64 `db:"deleted_flag"` // 是否删除
|
||||||
|
CreatedBy sql.NullInt64 `db:"created_by"` // 创建人
|
||||||
|
CreatedTime time.Time `db:"created_time"` // 创建时间
|
||||||
|
UpdatedBy sql.NullInt64 `db:"updated_by"` // 更新人
|
||||||
|
UpdatedTime sql.NullTime `db:"updated_time"` // 更新时间
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func newScParticipantLabelInfoModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultScParticipantLabelInfoModel {
|
||||||
|
return &defaultScParticipantLabelInfoModel{
|
||||||
|
CachedConn: sqlc.NewConn(conn, c, opts...),
|
||||||
|
table: "`sc_participant_label_info`",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) withSession(session sqlx.Session) *defaultScParticipantLabelInfoModel {
|
||||||
|
return &defaultScParticipantLabelInfoModel{
|
||||||
|
CachedConn: m.CachedConn.WithSession(session),
|
||||||
|
table: "`sc_participant_label_info`",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) Delete(ctx context.Context, id int64) error {
|
||||||
|
pcmScParticipantLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScParticipantLabelInfoIdPrefix, id)
|
||||||
|
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||||
|
query := fmt.Sprintf("delete from %s where `id` = ?", m.table)
|
||||||
|
return conn.ExecCtx(ctx, query, id)
|
||||||
|
}, pcmScParticipantLabelInfoIdKey)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) FindOne(ctx context.Context, id int64) (*ScParticipantLabelInfo, error) {
|
||||||
|
pcmScParticipantLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScParticipantLabelInfoIdPrefix, id)
|
||||||
|
var resp ScParticipantLabelInfo
|
||||||
|
err := m.QueryRowCtx(ctx, &resp, pcmScParticipantLabelInfoIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||||
|
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", scParticipantLabelInfoRows, m.table)
|
||||||
|
return conn.QueryRowCtx(ctx, v, query, id)
|
||||||
|
})
|
||||||
|
switch err {
|
||||||
|
case nil:
|
||||||
|
return &resp, nil
|
||||||
|
case sqlc.ErrNotFound:
|
||||||
|
return nil, ErrNotFound
|
||||||
|
default:
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) Insert(ctx context.Context, data *ScParticipantLabelInfo) (sql.Result, error) {
|
||||||
|
pcmScParticipantLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScParticipantLabelInfoIdPrefix, data.Id)
|
||||||
|
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||||
|
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?, ?)", m.table, scParticipantLabelInfoRowsExpectAutoSet)
|
||||||
|
return conn.ExecCtx(ctx, query, data.Id, data.Label, data.ParticipantId, data.Metadata, data.DeletedFlag, data.CreatedBy, data.CreatedTime, data.UpdatedBy, data.UpdatedTime)
|
||||||
|
}, pcmScParticipantLabelInfoIdKey)
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) Update(ctx context.Context, data *ScParticipantLabelInfo) error {
|
||||||
|
pcmScParticipantLabelInfoIdKey := fmt.Sprintf("%s%v", cachePcmScParticipantLabelInfoIdPrefix, data.Id)
|
||||||
|
_, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||||
|
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, scParticipantLabelInfoRowsWithPlaceHolder)
|
||||||
|
return conn.ExecCtx(ctx, query, data.Label, data.ParticipantId, data.Metadata, data.DeletedFlag, data.CreatedBy, data.CreatedTime, data.UpdatedBy, data.UpdatedTime, data.Id)
|
||||||
|
}, pcmScParticipantLabelInfoIdKey)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) formatPrimary(primary any) string {
|
||||||
|
return fmt.Sprintf("%s%v", cachePcmScParticipantLabelInfoIdPrefix, primary)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
||||||
|
query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", scParticipantLabelInfoRows, m.table)
|
||||||
|
return conn.QueryRowCtx(ctx, v, query, primary)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *defaultScParticipantLabelInfoModel) tableName() string {
|
||||||
|
return m.table
|
||||||
|
}
|
|
@ -18,8 +18,8 @@ type (
|
||||||
HpcInfo = pcmCore.HpcInfo
|
HpcInfo = pcmCore.HpcInfo
|
||||||
InfoListReq = pcmCore.InfoListReq
|
InfoListReq = pcmCore.InfoListReq
|
||||||
InfoListResp = pcmCore.InfoListResp
|
InfoListResp = pcmCore.InfoListResp
|
||||||
NodeLabel = pcmCore.NodeLabel
|
|
||||||
NodePhyInfo = pcmCore.NodePhyInfo
|
NodePhyInfo = pcmCore.NodePhyInfo
|
||||||
|
ParticipantLabel = pcmCore.ParticipantLabel
|
||||||
ParticipantPhyReq = pcmCore.ParticipantPhyReq
|
ParticipantPhyReq = pcmCore.ParticipantPhyReq
|
||||||
ParticipantPhyResp = pcmCore.ParticipantPhyResp
|
ParticipantPhyResp = pcmCore.ParticipantPhyResp
|
||||||
ParticipantTenant = pcmCore.ParticipantTenant
|
ParticipantTenant = pcmCore.ParticipantTenant
|
||||||
|
|
|
@ -18,8 +18,8 @@ type (
|
||||||
HpcInfo = pcmCore.HpcInfo
|
HpcInfo = pcmCore.HpcInfo
|
||||||
InfoListReq = pcmCore.InfoListReq
|
InfoListReq = pcmCore.InfoListReq
|
||||||
InfoListResp = pcmCore.InfoListResp
|
InfoListResp = pcmCore.InfoListResp
|
||||||
NodeLabel = pcmCore.NodeLabel
|
|
||||||
NodePhyInfo = pcmCore.NodePhyInfo
|
NodePhyInfo = pcmCore.NodePhyInfo
|
||||||
|
ParticipantLabel = pcmCore.ParticipantLabel
|
||||||
ParticipantPhyReq = pcmCore.ParticipantPhyReq
|
ParticipantPhyReq = pcmCore.ParticipantPhyReq
|
||||||
ParticipantPhyResp = pcmCore.ParticipantPhyResp
|
ParticipantPhyResp = pcmCore.ParticipantPhyResp
|
||||||
ParticipantTenant = pcmCore.ParticipantTenant
|
ParticipantTenant = pcmCore.ParticipantTenant
|
||||||
|
|
|
@ -4,7 +4,7 @@ NacosConfig:
|
||||||
ServerConfigs:
|
ServerConfigs:
|
||||||
# - IpAddr: 127.0.0.1
|
# - IpAddr: 127.0.0.1
|
||||||
# Port: 8848
|
# Port: 8848
|
||||||
- IpAddr: 10.101.15.7
|
- IpAddr: nacos.jcce.dev
|
||||||
Port: 8848
|
Port: 8848
|
||||||
ClientConfig:
|
ClientConfig:
|
||||||
NamespaceId: test
|
NamespaceId: test
|
||||||
|
@ -12,4 +12,4 @@ NacosConfig:
|
||||||
NotLoadCacheAtStart: true
|
NotLoadCacheAtStart: true
|
||||||
LogDir:
|
LogDir:
|
||||||
CacheDir:
|
CacheDir:
|
||||||
LogLevel: debug
|
LogLevel: info
|
|
@ -29,15 +29,25 @@ func NewRegisterParticipantLogic(ctx context.Context, svcCtx *svc.ServiceContext
|
||||||
// RegisterParticipant Participant注册接口
|
// RegisterParticipant Participant注册接口
|
||||||
func (l *RegisterParticipantLogic) RegisterParticipant(in *pcmCore.ParticipantPhyReq) (*pcmCore.ParticipantPhyResp, error) {
|
func (l *RegisterParticipantLogic) RegisterParticipant(in *pcmCore.ParticipantPhyReq) (*pcmCore.ParticipantPhyResp, error) {
|
||||||
//判断ParticipantId是否存在
|
//判断ParticipantId是否存在
|
||||||
db := l.svcCtx.DbEngin
|
db := l.svcCtx.DbEngin.Begin()
|
||||||
if db.Error != nil {
|
// 执行回滚或者提交操作
|
||||||
return nil, db.Error
|
defer func() {
|
||||||
|
if p := recover(); p != nil {
|
||||||
|
db.Rollback()
|
||||||
|
logx.Error(p)
|
||||||
|
} else if db.Error != nil {
|
||||||
|
logx.Info("rollback")
|
||||||
|
db.Rollback()
|
||||||
|
} else {
|
||||||
|
db = db.Commit()
|
||||||
|
logx.Info("commit success")
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
participantInfo := &model.ScParticipantPhyInfo{}
|
participantInfo := &model.ScParticipantPhyInfo{}
|
||||||
tool.Convert(in, participantInfo)
|
tool.Convert(in, participantInfo)
|
||||||
if in.ParticipantId == 0 {
|
if in.ParticipantId == 0 {
|
||||||
var err error
|
var err error
|
||||||
participantInfo.Id, err = tool.GenSnowflakeID(l.svcCtx.Config.SnowflakeConf.MachineId)
|
participantInfo.Id = tool.GenSnowflakeID()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logx.Errorf("生成id错误 err:", err)
|
logx.Errorf("生成id错误 err:", err)
|
||||||
}
|
}
|
||||||
|
@ -48,24 +58,38 @@ func (l *RegisterParticipantLogic) RegisterParticipant(in *pcmCore.ParticipantPh
|
||||||
//保存participant静态信息
|
//保存participant静态信息
|
||||||
result := db.Save(&participantInfo)
|
result := db.Save(&participantInfo)
|
||||||
//保存节点信息
|
//保存节点信息
|
||||||
nodeInfo := &model.ScNodePhyInfo{}
|
nodeList := make([]*model.ScNodePhyInfo, 0)
|
||||||
for _, info := range in.NodeInfo {
|
for _, info := range in.NodeInfo {
|
||||||
var err error
|
nodeInfo := &model.ScNodePhyInfo{}
|
||||||
tool.Convert(info, nodeInfo)
|
tool.Convert(info, nodeInfo)
|
||||||
nodeInfo.CreatedTime = time.Now()
|
nodeInfo.CreatedTime = time.Now()
|
||||||
nodeInfo.ParticipantId = participantInfo.Id
|
nodeInfo.ParticipantId = participantInfo.Id
|
||||||
nodeInfo.Id, err = tool.GenSnowflakeID(l.svcCtx.Config.SnowflakeConf.MachineId)
|
if nodeInfo.Id == 0 {
|
||||||
if err != nil {
|
nodeInfo.Id = tool.GenSnowflakeID()
|
||||||
logx.Errorf("生成id错误 err:", err)
|
|
||||||
}
|
}
|
||||||
result = db.Save(nodeInfo)
|
nodeList = append(nodeList, nodeInfo)
|
||||||
|
}
|
||||||
|
result = db.Save(&nodeList)
|
||||||
|
//保存标签信息
|
||||||
|
labelList := make([]*model.ScParticipantLabelInfo, 0)
|
||||||
|
for _, label := range in.LabelInfo {
|
||||||
|
labelInfo := &model.ScParticipantLabelInfo{}
|
||||||
|
tool.Convert(label, labelInfo)
|
||||||
|
labelInfo.CreatedTime = time.Now()
|
||||||
|
labelInfo.ParticipantId = participantInfo.Id
|
||||||
|
if labelInfo.Id == 0 {
|
||||||
|
labelInfo.Id = tool.GenSnowflakeID()
|
||||||
|
}
|
||||||
|
labelList = append(labelList, labelInfo)
|
||||||
|
}
|
||||||
|
result = db.Save(&labelList)
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
logx.Errorf("orm err:", result.Error)
|
logx.Errorf("orm err:", result.Error)
|
||||||
return &pcmCore.ParticipantPhyResp{}, nil
|
return &pcmCore.ParticipantPhyResp{}, nil
|
||||||
}
|
}
|
||||||
}
|
return &pcmCore.ParticipantPhyResp{
|
||||||
if result.Error != nil {
|
Code: 200,
|
||||||
logx.Errorf("orm err:", result.Error)
|
Msg: "ok",
|
||||||
}
|
ParticipantId: participantInfo.Id,
|
||||||
return &pcmCore.ParticipantPhyResp{}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,9 @@ package svc
|
||||||
import (
|
import (
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/config"
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/config"
|
||||||
|
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||||
"gorm.io/driver/mysql"
|
"gorm.io/driver/mysql"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/logger"
|
"gorm.io/gorm/logger"
|
||||||
|
@ -22,8 +24,14 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||||
NamingStrategy: schema.NamingStrategy{
|
NamingStrategy: schema.NamingStrategy{
|
||||||
SingularTable: true, // 使用单数表名,启用该选项,此时,`User` 的表名应该是 `t_user`
|
SingularTable: true, // 使用单数表名,启用该选项,此时,`User` 的表名应该是 `t_user`
|
||||||
},
|
},
|
||||||
Logger: logger.Default.LogMode(logger.Info),
|
Logger: logger.Default.LogMode(logger.Error),
|
||||||
})
|
})
|
||||||
|
//添加snowflake支持
|
||||||
|
err := tool.InitSnowflake(c.SnowflakeConf.MachineId)
|
||||||
|
if err != nil {
|
||||||
|
logx.Errorf("InitSnowflake err: ", err)
|
||||||
|
panic("InitSnowflake err")
|
||||||
|
}
|
||||||
return &ServiceContext{
|
return &ServiceContext{
|
||||||
Cron: cron.New(cron.WithSeconds()),
|
Cron: cron.New(cron.WithSeconds()),
|
||||||
Config: c,
|
Config: c,
|
||||||
|
|
|
@ -95,13 +95,13 @@ service pcmCore {
|
||||||
}
|
}
|
||||||
|
|
||||||
// participantTenant 租户信息
|
// participantTenant 租户信息
|
||||||
message participantTenant{
|
message ParticipantTenant{
|
||||||
string tenantName = 1; //租户名称
|
string tenantName = 1; //租户名称
|
||||||
}
|
}
|
||||||
|
|
||||||
// 节点标签
|
// 集群标签
|
||||||
message NodeLabel {
|
message ParticipantLabel {
|
||||||
string id = 1; //id
|
int64 id = 1; //id
|
||||||
string label = 2; //标签名称
|
string label = 2; //标签名称
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ enum MessageStatus {
|
||||||
message ParticipantPhyResp {
|
message ParticipantPhyResp {
|
||||||
int64 code = 1;
|
int64 code = 1;
|
||||||
string msg = 2;
|
string msg = 2;
|
||||||
string participantId = 3; //participant 唯一标识
|
int64 participantId = 3; //participant 唯一标识
|
||||||
}
|
}
|
||||||
|
|
||||||
//participantPhy 静态信息
|
//participantPhy 静态信息
|
||||||
|
@ -132,17 +132,18 @@ message ParticipantPhyReq {
|
||||||
string tenantName = 12; //租户名称
|
string tenantName = 12; //租户名称
|
||||||
repeated NodePhyInfo nodeInfo = 13; //节点信息
|
repeated NodePhyInfo nodeInfo = 13; //节点信息
|
||||||
int64 participantId = 14; //participant id
|
int64 participantId = 14; //participant id
|
||||||
|
repeated ParticipantLabel labelInfo = 15; //标签信息
|
||||||
}
|
}
|
||||||
|
|
||||||
// nodePhyInfo 节点信息
|
// nodePhyInfo 节点信息
|
||||||
message NodePhyInfo {
|
message NodePhyInfo {
|
||||||
string nodeName = 1; //节点名称
|
int64 id = 1;
|
||||||
string osName = 2; //系统名称
|
string nodeName = 2; //节点名称
|
||||||
string osVersion = 3; //系统版本
|
string osName = 3; //系统名称
|
||||||
string archType = 4; //架构类型
|
string osVersion = 4; //系统版本
|
||||||
string archName = 5; //架构名称
|
string archType = 5; //架构类型
|
||||||
string archFreq = 6; //架构频率
|
string archName = 6; //架构名称
|
||||||
repeated NodeLabel nodeLabel = 7; //节点标签
|
string archFreq = 7; //架构频率
|
||||||
}
|
}
|
||||||
|
|
||||||
// participant 参与者
|
// participant 参与者
|
||||||
|
|
|
@ -854,18 +854,18 @@ func (x *ParticipantTenant) GetTenantName() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// 节点标签
|
// 集群标签
|
||||||
type NodeLabel struct {
|
type ParticipantLabel struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` //id
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||||
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` //标签名称
|
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` //标签名称
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodeLabel) Reset() {
|
func (x *ParticipantLabel) Reset() {
|
||||||
*x = NodeLabel{}
|
*x = ParticipantLabel{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_pb_pcmCore_proto_msgTypes[8]
|
mi := &file_pb_pcmCore_proto_msgTypes[8]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
@ -873,13 +873,13 @@ func (x *NodeLabel) Reset() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodeLabel) String() string {
|
func (x *ParticipantLabel) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*NodeLabel) ProtoMessage() {}
|
func (*ParticipantLabel) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *NodeLabel) ProtoReflect() protoreflect.Message {
|
func (x *ParticipantLabel) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_pb_pcmCore_proto_msgTypes[8]
|
mi := &file_pb_pcmCore_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
@ -891,19 +891,19 @@ func (x *NodeLabel) ProtoReflect() protoreflect.Message {
|
||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use NodeLabel.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ParticipantLabel.ProtoReflect.Descriptor instead.
|
||||||
func (*NodeLabel) Descriptor() ([]byte, []int) {
|
func (*ParticipantLabel) Descriptor() ([]byte, []int) {
|
||||||
return file_pb_pcmCore_proto_rawDescGZIP(), []int{8}
|
return file_pb_pcmCore_proto_rawDescGZIP(), []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodeLabel) GetId() string {
|
func (x *ParticipantLabel) GetId() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Id
|
return x.Id
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodeLabel) GetLabel() string {
|
func (x *ParticipantLabel) GetLabel() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Label
|
return x.Label
|
||||||
}
|
}
|
||||||
|
@ -917,7 +917,7 @@ type ParticipantPhyResp struct {
|
||||||
|
|
||||||
Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||||
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||||
ParticipantId string `protobuf:"bytes,3,opt,name=participantId,proto3" json:"participantId,omitempty"` //participant 唯一标识
|
ParticipantId int64 `protobuf:"varint,3,opt,name=participantId,proto3" json:"participantId,omitempty"` //participant 唯一标识
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ParticipantPhyResp) Reset() {
|
func (x *ParticipantPhyResp) Reset() {
|
||||||
|
@ -966,11 +966,11 @@ func (x *ParticipantPhyResp) GetMsg() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ParticipantPhyResp) GetParticipantId() string {
|
func (x *ParticipantPhyResp) GetParticipantId() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.ParticipantId
|
return x.ParticipantId
|
||||||
}
|
}
|
||||||
return ""
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// participantPhy 静态信息
|
// participantPhy 静态信息
|
||||||
|
@ -992,6 +992,7 @@ type ParticipantPhyReq struct {
|
||||||
TenantName string `protobuf:"bytes,12,opt,name=tenantName,proto3" json:"tenantName,omitempty"` //租户名称
|
TenantName string `protobuf:"bytes,12,opt,name=tenantName,proto3" json:"tenantName,omitempty"` //租户名称
|
||||||
NodeInfo []*NodePhyInfo `protobuf:"bytes,13,rep,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` //节点信息
|
NodeInfo []*NodePhyInfo `protobuf:"bytes,13,rep,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` //节点信息
|
||||||
ParticipantId int64 `protobuf:"varint,14,opt,name=participantId,proto3" json:"participantId,omitempty"` //participant id
|
ParticipantId int64 `protobuf:"varint,14,opt,name=participantId,proto3" json:"participantId,omitempty"` //participant id
|
||||||
|
LabelInfo []*ParticipantLabel `protobuf:"bytes,15,rep,name=labelInfo,proto3" json:"labelInfo,omitempty"` //标签信息
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ParticipantPhyReq) Reset() {
|
func (x *ParticipantPhyReq) Reset() {
|
||||||
|
@ -1117,19 +1118,26 @@ func (x *ParticipantPhyReq) GetParticipantId() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *ParticipantPhyReq) GetLabelInfo() []*ParticipantLabel {
|
||||||
|
if x != nil {
|
||||||
|
return x.LabelInfo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// nodePhyInfo 节点信息
|
// nodePhyInfo 节点信息
|
||||||
type NodePhyInfo struct {
|
type NodePhyInfo struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
NodeName string `protobuf:"bytes,1,opt,name=nodeName,proto3" json:"nodeName,omitempty"` //节点名称
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
OsName string `protobuf:"bytes,2,opt,name=osName,proto3" json:"osName,omitempty"` //系统名称
|
NodeName string `protobuf:"bytes,2,opt,name=nodeName,proto3" json:"nodeName,omitempty"` //节点名称
|
||||||
OsVersion string `protobuf:"bytes,3,opt,name=osVersion,proto3" json:"osVersion,omitempty"` //系统版本
|
OsName string `protobuf:"bytes,3,opt,name=osName,proto3" json:"osName,omitempty"` //系统名称
|
||||||
ArchType string `protobuf:"bytes,4,opt,name=archType,proto3" json:"archType,omitempty"` //架构类型
|
OsVersion string `protobuf:"bytes,4,opt,name=osVersion,proto3" json:"osVersion,omitempty"` //系统版本
|
||||||
ArchName string `protobuf:"bytes,5,opt,name=archName,proto3" json:"archName,omitempty"` //架构名称
|
ArchType string `protobuf:"bytes,5,opt,name=archType,proto3" json:"archType,omitempty"` //架构类型
|
||||||
ArchFreq string `protobuf:"bytes,6,opt,name=archFreq,proto3" json:"archFreq,omitempty"` //架构频率
|
ArchName string `protobuf:"bytes,6,opt,name=archName,proto3" json:"archName,omitempty"` //架构名称
|
||||||
NodeLabel []*NodeLabel `protobuf:"bytes,7,rep,name=nodeLabel,proto3" json:"nodeLabel,omitempty"` //节点标签
|
ArchFreq string `protobuf:"bytes,7,opt,name=archFreq,proto3" json:"archFreq,omitempty"` //架构频率
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodePhyInfo) Reset() {
|
func (x *NodePhyInfo) Reset() {
|
||||||
|
@ -1164,6 +1172,13 @@ func (*NodePhyInfo) Descriptor() ([]byte, []int) {
|
||||||
return file_pb_pcmCore_proto_rawDescGZIP(), []int{11}
|
return file_pb_pcmCore_proto_rawDescGZIP(), []int{11}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *NodePhyInfo) GetId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *NodePhyInfo) GetNodeName() string {
|
func (x *NodePhyInfo) GetNodeName() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.NodeName
|
return x.NodeName
|
||||||
|
@ -1206,13 +1221,6 @@ func (x *NodePhyInfo) GetArchFreq() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodePhyInfo) GetNodeLabel() []*NodeLabel {
|
|
||||||
if x != nil {
|
|
||||||
return x.NodeLabel
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_pb_pcmCore_proto protoreflect.FileDescriptor
|
var File_pb_pcmCore_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_pb_pcmCore_proto_rawDesc = []byte{
|
var file_pb_pcmCore_proto_rawDesc = []byte{
|
||||||
|
@ -1333,82 +1341,84 @@ var file_pb_pcmCore_proto_rawDesc = []byte{
|
||||||
0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0a, 0x41, 0x69, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74,
|
0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0a, 0x41, 0x69, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74,
|
||||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65,
|
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65,
|
||||||
0x2e, 0x41, 0x69, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x41, 0x69, 0x49, 0x6e, 0x66, 0x6f, 0x4c,
|
0x2e, 0x41, 0x69, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x41, 0x69, 0x49, 0x6e, 0x66, 0x6f, 0x4c,
|
||||||
0x69, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
|
0x69, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
|
||||||
0x6e, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x6e, 0x61,
|
0x6e, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x6e, 0x61,
|
||||||
0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65,
|
0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65,
|
||||||
0x6e, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65,
|
0x6e, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74,
|
||||||
0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x0e, 0x0a, 0x02,
|
||||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02,
|
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x60, 0x0a, 0x12, 0x50,
|
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62,
|
||||||
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x50, 0x68, 0x79, 0x52, 0x65, 0x73,
|
0x65, 0x6c, 0x22, 0x60, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||||
0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
0x74, 0x50, 0x68, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69,
|
0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x24,
|
||||||
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
|
0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18,
|
||||||
0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xd1, 0x03,
|
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
|
||||||
0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x50, 0x68, 0x79,
|
0x6e, 0x74, 0x49, 0x64, 0x22, 0x8a, 0x04, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
|
||||||
0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x70, 0x61, 0x6e, 0x74, 0x50, 0x68, 0x79, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f,
|
||||||
0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18,
|
0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e,
|
0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f,
|
||||||
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
0x72, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70,
|
||||||
0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a,
|
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||||
0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74,
|
0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42,
|
||||||
0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
|
||||||
0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f,
|
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
|
||||||
0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||||
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73,
|
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79,
|
||||||
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
|
0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x70, 0x61,
|
||||||
0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12,
|
0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
|
||||||
0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x53,
|
0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
|
||||||
0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72,
|
0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||||
0x61, 0x67, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a,
|
0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x53,
|
||||||
0x10, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74,
|
0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42,
|
||||||
0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
|
||||||
0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
|
||||||
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a,
|
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||||
0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
|
0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64,
|
||||||
0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x6e,
|
0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64,
|
||||||
0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74,
|
0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c,
|
||||||
0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6e, 0x6f, 0x64,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65,
|
||||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x63,
|
0x12, 0x30, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0d, 0x20, 0x03,
|
||||||
0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x68, 0x79, 0x49, 0x6e, 0x66,
|
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64,
|
||||||
0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x70,
|
0x65, 0x50, 0x68, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e,
|
||||||
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01,
|
0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||||
0x28, 0x03, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49,
|
0x74, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69,
|
||||||
0x64, 0x22, 0xe5, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x68, 0x79, 0x49, 0x6e, 0x66,
|
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65,
|
||||||
0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x63,
|
||||||
|
0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||||
|
0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6e, 0x66,
|
||||||
|
0x6f, 0x22, 0xc3, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x68, 0x79, 0x49, 0x6e, 0x66,
|
||||||
|
0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
|
||||||
|
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
|
||||||
0x06, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f,
|
0x06, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f,
|
||||||
0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69,
|
0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69,
|
||||||
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73,
|
0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73,
|
||||||
0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18,
|
0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12,
|
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||||
0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61,
|
0x09, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61,
|
||||||
0x72, 0x63, 0x68, 0x46, 0x72, 0x65, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61,
|
0x72, 0x63, 0x68, 0x46, 0x72, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61,
|
||||||
0x72, 0x63, 0x68, 0x46, 0x72, 0x65, 0x71, 0x12, 0x30, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c,
|
0x72, 0x63, 0x68, 0x46, 0x72, 0x65, 0x71, 0x2a, 0x33, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||||
0x61, 0x62, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x63, 0x6d,
|
0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c,
|
||||||
0x43, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x09,
|
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12,
|
||||||
0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2a, 0x33, 0x0a, 0x0d, 0x4d, 0x65, 0x73,
|
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x32, 0x7b, 0x0a, 0x07,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41,
|
0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x49,
|
||||||
0x49, 0x4c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10,
|
0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x79,
|
||||||
0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x32, 0x7b,
|
0x6e, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43,
|
||||||
0x0a, 0x07, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x79, 0x6e,
|
0x6f, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e,
|
0x12, 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70,
|
||||||
0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x63,
|
0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||||
0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
|
0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x66,
|
||||||
0x73, 0x70, 0x12, 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14,
|
0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0x66, 0x0a, 0x12, 0x70, 0x61, 0x72,
|
||||||
0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73,
|
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||||
0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x49,
|
0x50, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69,
|
||||||
0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0x66, 0x0a, 0x12, 0x70,
|
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65,
|
||||||
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x50, 0x68, 0x79, 0x52,
|
||||||
0x65, 0x12, 0x50, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72,
|
0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72,
|
||||||
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f,
|
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x50, 0x68, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||||
0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x50, 0x68,
|
0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,
|
||||||
0x79, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x50, 0x68, 0x79, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x62,
|
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1434,8 +1444,8 @@ var file_pb_pcmCore_proto_goTypes = []interface{}{
|
||||||
(*SyncInfoResp)(nil), // 5: pcmCore.SyncInfoResp
|
(*SyncInfoResp)(nil), // 5: pcmCore.SyncInfoResp
|
||||||
(*InfoListReq)(nil), // 6: pcmCore.InfoListReq
|
(*InfoListReq)(nil), // 6: pcmCore.InfoListReq
|
||||||
(*InfoListResp)(nil), // 7: pcmCore.InfoListResp
|
(*InfoListResp)(nil), // 7: pcmCore.InfoListResp
|
||||||
(*ParticipantTenant)(nil), // 8: pcmCore.participantTenant
|
(*ParticipantTenant)(nil), // 8: pcmCore.ParticipantTenant
|
||||||
(*NodeLabel)(nil), // 9: pcmCore.NodeLabel
|
(*ParticipantLabel)(nil), // 9: pcmCore.ParticipantLabel
|
||||||
(*ParticipantPhyResp)(nil), // 10: pcmCore.ParticipantPhyResp
|
(*ParticipantPhyResp)(nil), // 10: pcmCore.ParticipantPhyResp
|
||||||
(*ParticipantPhyReq)(nil), // 11: pcmCore.ParticipantPhyReq
|
(*ParticipantPhyReq)(nil), // 11: pcmCore.ParticipantPhyReq
|
||||||
(*NodePhyInfo)(nil), // 12: pcmCore.NodePhyInfo
|
(*NodePhyInfo)(nil), // 12: pcmCore.NodePhyInfo
|
||||||
|
@ -1448,7 +1458,7 @@ var file_pb_pcmCore_proto_depIdxs = []int32{
|
||||||
3, // 4: pcmCore.InfoListResp.CloudInfoList:type_name -> pcmCore.CloudInfo
|
3, // 4: pcmCore.InfoListResp.CloudInfoList:type_name -> pcmCore.CloudInfo
|
||||||
2, // 5: pcmCore.InfoListResp.AiInfoList:type_name -> pcmCore.AiInfo
|
2, // 5: pcmCore.InfoListResp.AiInfoList:type_name -> pcmCore.AiInfo
|
||||||
12, // 6: pcmCore.ParticipantPhyReq.nodeInfo:type_name -> pcmCore.NodePhyInfo
|
12, // 6: pcmCore.ParticipantPhyReq.nodeInfo:type_name -> pcmCore.NodePhyInfo
|
||||||
9, // 7: pcmCore.NodePhyInfo.nodeLabel:type_name -> pcmCore.NodeLabel
|
9, // 7: pcmCore.ParticipantPhyReq.labelInfo:type_name -> pcmCore.ParticipantLabel
|
||||||
1, // 8: pcmCore.pcmCore.SyncInfo:input_type -> pcmCore.SyncInfoReq
|
1, // 8: pcmCore.pcmCore.SyncInfo:input_type -> pcmCore.SyncInfoReq
|
||||||
6, // 9: pcmCore.pcmCore.InfoList:input_type -> pcmCore.InfoListReq
|
6, // 9: pcmCore.pcmCore.InfoList:input_type -> pcmCore.InfoListReq
|
||||||
11, // 10: pcmCore.participantService.registerParticipant:input_type -> pcmCore.ParticipantPhyReq
|
11, // 10: pcmCore.participantService.registerParticipant:input_type -> pcmCore.ParticipantPhyReq
|
||||||
|
@ -1565,7 +1575,7 @@ func file_pb_pcmCore_proto_init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_pb_pcmCore_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
file_pb_pcmCore_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*NodeLabel); i {
|
switch v := v.(*ParticipantLabel); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
|
Loading…
Reference in New Issue