package pruning
import "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/pruning"
Index ¶
- func Prune(obj interface{}, s *structuralschema.Structural, isResourceRoot bool)
- func PruneWithOptions(obj interface{}, s *structuralschema.Structural, isResourceRoot bool, opts PruneOptions) []string
- type PruneOptions
Functions ¶
func Prune ¶
func Prune(obj interface{}, s *structuralschema.Structural, isResourceRoot bool)
Prune is equivalent to PruneWithOptions(obj, s, isResourceRoot, PruneOptions{})
func PruneWithOptions ¶
func PruneWithOptions(obj interface{}, s *structuralschema.Structural, isResourceRoot bool, opts PruneOptions) []string
PruneWithOptions removes object fields in obj which are not specified in s. It skips TypeMeta and ObjectMeta fields if XEmbeddedResource is set to true, or for the root if isResourceRoot=true, i.e. it does not prune unknown metadata fields. It returns the set of fields that it prunes if opts.ReturnPruned is true
Types ¶
type PruneOptions ¶
type PruneOptions struct { // ReturnPruned defines whether we want to track the // fields that are pruned ReturnPruned bool // contains filtered or unexported fields }
PruneOptions sets options for pruning unknown fields
Source Files ¶
algorithm.go
- Version
- v0.24.0-alpha.0
- Published
- Nov 24, 2021
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 44 minutes ago –
Tools for package owners.