mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Prepare for content-type negotiation
Combine the fields that will be used for content transformation (content-type, codec, and group version) into a single struct in client, and then pass that struct into the rest client and request. Set the content-type when sending requests to the server, and accept the content type as primary. Will form the foundation for content-negotiation via the client.
This commit is contained in:
@@ -51,10 +51,10 @@ func mustSetupScheduler() (schedulerConfigFactory *factory.ConfigFactory, destro
|
||||
}))
|
||||
|
||||
c := client.NewOrDie(&client.Config{
|
||||
Host: s.URL,
|
||||
GroupVersion: testapi.Default.GroupVersion(),
|
||||
QPS: 5000.0,
|
||||
Burst: 5000,
|
||||
Host: s.URL,
|
||||
ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()},
|
||||
QPS: 5000.0,
|
||||
Burst: 5000,
|
||||
})
|
||||
|
||||
schedulerConfigFactory = factory.NewConfigFactory(c, api.DefaultSchedulerName)
|
||||
|
||||
Reference in New Issue
Block a user