mirror of
https://github.com/rancher/steve.git
synced 2025-09-08 02:39:26 +00:00
Initial implmentation of warning headers
Attempts to pass through warning headers which k8s returns. Requires an update to rancher/apiserver.
This commit is contained in:
committed by
Chad Roberts
parent
7565dba268
commit
956b7351aa
@@ -5,6 +5,8 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/rancher/apiserver/pkg/types"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
"golang.org/x/sync/semaphore"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
@@ -33,7 +35,7 @@ type ParallelPartitionLister struct {
|
||||
}
|
||||
|
||||
// PartitionLister lists objects for one partition.
|
||||
type PartitionLister func(ctx context.Context, partition Partition, cont string, revision string, limit int) (*unstructured.UnstructuredList, error)
|
||||
type PartitionLister func(ctx context.Context, partition Partition, cont string, revision string, limit int) (*unstructured.UnstructuredList, []types.Warning, error)
|
||||
|
||||
// Err returns the latest error encountered.
|
||||
func (p *ParallelPartitionLister) Err() error {
|
||||
@@ -174,7 +176,7 @@ func (p *ParallelPartitionLister) feeder(ctx context.Context, state listState, l
|
||||
if partition.Name() == state.PartitionName {
|
||||
cont = state.Continue
|
||||
}
|
||||
list, err := p.Lister(ctx, partition, cont, state.Revision, limit)
|
||||
list, _, err := p.Lister(ctx, partition, cont, state.Revision, limit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user