add schedulerState resolver

This commit is contained in:
Christoph Kluge
2025-11-12 13:50:09 +01:00
parent c2c63d2f67
commit fb278182d3

View File

@@ -312,7 +312,11 @@ func (r *nodeResolver) ID(ctx context.Context, obj *schema.Node) (string, error)
// SchedulerState is the resolver for the schedulerState field. // SchedulerState is the resolver for the schedulerState field.
func (r *nodeResolver) SchedulerState(ctx context.Context, obj *schema.Node) (schema.SchedulerState, error) { func (r *nodeResolver) SchedulerState(ctx context.Context, obj *schema.Node) (schema.SchedulerState, error) {
panic(fmt.Errorf("not implemented: SchedulerState - schedulerState")) if obj.NodeState != "" {
return obj.NodeState, nil
} else {
return "", fmt.Errorf("No SchedulerState (NodeState) on Object")
}
} }
// HealthState is the resolver for the healthState field. // HealthState is the resolver for the healthState field.