@@ -30,15 +30,6 @@ func (c *Calcium) ListNodeWorkloads(ctx context.Context, nodename string, labels
30
30
return workloads , logger .ErrWithTracing (ctx , errors .WithStack (err ))
31
31
}
32
32
33
- func (c * Calcium ) getWorkloadNode (ctx context.Context , id string ) (* types.Node , error ) {
34
- w , err := c .GetWorkload (ctx , id )
35
- if err != nil {
36
- return nil , err
37
- }
38
- node , err := c .GetNode (ctx , w .Nodename , nil )
39
- return node , err
40
- }
41
-
42
33
// GetWorkload get a workload
43
34
func (c * Calcium ) GetWorkload (ctx context.Context , id string ) (workload * types.Workload , err error ) {
44
35
logger := log .WithField ("Calcium" , "GetWorkload" ).WithField ("id" , id )
@@ -54,3 +45,12 @@ func (c *Calcium) GetWorkloads(ctx context.Context, ids []string) (workloads []*
54
45
workloads , err = c .store .GetWorkloads (ctx , ids )
55
46
return workloads , log .WithField ("Calcium" , "GetWorkloads" ).WithField ("ids" , ids ).ErrWithTracing (ctx , errors .WithStack (err ))
56
47
}
48
+
49
+ func (c * Calcium ) getWorkloadNode (ctx context.Context , id string ) (* types.Node , error ) {
50
+ w , err := c .GetWorkload (ctx , id )
51
+ if err != nil {
52
+ return nil , err
53
+ }
54
+ node , err := c .GetNode (ctx , w .Nodename , nil )
55
+ return node , err
56
+ }
0 commit comments