You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

TaskInfo.go 1.3 kB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. Copyright (c) [2023] [pcm]
  3. [pcm-coordinator] is licensed under Mulan PSL v2.
  4. You can use this software according to the terms and conditions of the Mulan PSL v2.
  5. You may obtain a copy of Mulan PSL v2 at:
  6. http://license.coscl.org.cn/MulanPSL2
  7. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  8. EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  9. MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  10. See the Mulan PSL v2 for more details.
  11. */
  12. package response
  13. import "fmt"
  14. type TaskInfo struct {
  15. TaskId int64 `json:"taskId,optional"`
  16. NsID string `json:"nsID"` //云际平台传入namespace
  17. TaskType string `json:"taskType,optional"`
  18. MatchLabels map[string]string `json:"matchLabels"`
  19. ParticipantId int64 `json:"participantId,optional"` //湘江预留字段
  20. Clusters []string `json:"clusters,optional"` //云际平台传入集群名称列表
  21. TenantId int64 `json:"tenantId"`
  22. Replicas int64 `json:"replicas"`
  23. Metadata []string `json:"metadata"`
  24. }
  25. func (t *TaskInfo) Validate() error {
  26. if t.TenantId == 0 {
  27. return fmt.Errorf("tenantId is nil")
  28. }
  29. return nil
  30. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.