Skip to content

Commit

Permalink
暴露ComponentView的id (PaddlePaddle#1354)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyTOmeLight authored Nov 8, 2024
1 parent a9a1064 commit b51a111
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/common/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

type ComponentView interface {
GetID() string
GetComponentName() string
GetParentDagID() string
GetStatus() JobStatus
Expand Down Expand Up @@ -60,6 +61,10 @@ type JobView struct {
CacheJobID string `json:"cacheJobID"`
}

func (j JobView) GetID() string {
return j.JobID
}

func (j JobView) GetComponentName() string {
return j.StepName
}
Expand Down Expand Up @@ -118,6 +123,10 @@ type DagView struct {
EntryPoints map[string][]ComponentView `json:"entryPoints"`
}

func (d DagView) GetID() string {
return d.DagID
}

func (d DagView) GetComponentName() string {
return d.DagName
}
Expand Down

0 comments on commit b51a111

Please sign in to comment.