| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package v1beta1 |
| 20 |
|
| 21 |
import ( |
| 22 |
context "context" |
| 23 |
|
| 24 |
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" |
| 25 |
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 26 |
types "k8s.io/apimachinery/pkg/types" |
| 27 |
watch "k8s.io/apimachinery/pkg/watch" |
| 28 |
applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" |
| 29 |
gentype "k8s.io/client-go/gentype" |
| 30 |
scheme "k8s.io/client-go/kubernetes/scheme" |
| 31 |
) |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
type PriorityClassesGetter interface { |
| 36 |
PriorityClasses() PriorityClassInterface |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
type PriorityClassInterface interface { |
| 41 |
Create(ctx context.Context, priorityClass *schedulingv1beta1.PriorityClass, opts v1.CreateOptions) (*schedulingv1beta1.PriorityClass, error) |
| 42 |
Update(ctx context.Context, priorityClass *schedulingv1beta1.PriorityClass, opts v1.UpdateOptions) (*schedulingv1beta1.PriorityClass, error) |
| 43 |
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error |
| 44 |
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error |
| 45 |
Get(ctx context.Context, name string, opts v1.GetOptions) (*schedulingv1beta1.PriorityClass, error) |
| 46 |
List(ctx context.Context, opts v1.ListOptions) (*schedulingv1beta1.PriorityClassList, error) |
| 47 |
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) |
| 48 |
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1beta1.PriorityClass, err error) |
| 49 |
Apply(ctx context.Context, priorityClass *applyconfigurationsschedulingv1beta1.PriorityClassApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1beta1.PriorityClass, err error) |
| 50 |
PriorityClassExpansion |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
type priorityClasses struct { |
| 55 |
*gentype.ClientWithListAndApply[*schedulingv1beta1.PriorityClass, *schedulingv1beta1.PriorityClassList, *applyconfigurationsschedulingv1beta1.PriorityClassApplyConfiguration] |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
func newPriorityClasses(c *SchedulingV1beta1Client) *priorityClasses { |
| 60 |
return &priorityClasses{ |
| 61 |
gentype.NewClientWithListAndApply[*schedulingv1beta1.PriorityClass, *schedulingv1beta1.PriorityClassList, *applyconfigurationsschedulingv1beta1.PriorityClassApplyConfiguration]( |
| 62 |
"priorityclasses", |
| 63 |
c.RESTClient(), |
| 64 |
scheme.ParameterCodec, |
| 65 |
"", |
| 66 |
func() *schedulingv1beta1.PriorityClass { return &schedulingv1beta1.PriorityClass{} }, |
| 67 |
func() *schedulingv1beta1.PriorityClassList { return &schedulingv1beta1.PriorityClassList{} }, |
| 68 |
gentype.PrefersProtobuf[*schedulingv1beta1.PriorityClass](), |
| 69 |
), |
| 70 |
} |
| 71 |
} |