Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCachingUnstructuredExtractor ¶
func NewCachingUnstructuredExtractor(ctx context.Context, dc discovery.DiscoveryInterface, cache *GVKParserCache) (applymetav1.UnstructuredExtractor, error)
NewCachingUnstructuredExtractor returns a new cachingUnstructuredExtractor
Types ¶
type GVKParserCache ¶
type GVKParserCache struct {
// contains filtered or unexported fields
}
GVKParserCache holds the cached parser instances and the ETags of the associated provider config. Parsers are generated and cached per GroupVersion
type GVKParserCacheManager ¶
type GVKParserCacheManager struct {
// contains filtered or unexported fields
}
GVKParserCacheManager maintains GVK parser cache stores for each provider config. The implementation is thread-safe.
func NewGVKParserCacheManager ¶
func NewGVKParserCacheManager(opts ...GVKParserCacheManagerOption) *GVKParserCacheManager
NewGVKParserCacheManager returns a new empty *GVKParserCacheManager.
func (*GVKParserCacheManager) LoadOrNewCacheForProviderConfig ¶
func (cm *GVKParserCacheManager) LoadOrNewCacheForProviderConfig(pc *v1alpha1.ProviderConfig) (*GVKParserCache, error)
LoadOrNewCacheForProviderConfig returns the *GVKParserCache for the given provider config, initializing an empty cache for the first use. the implementation is concurrency-safe.
func (*GVKParserCacheManager) RemoveCache ¶
func (cm *GVKParserCacheManager) RemoveCache(pc *v1alpha1.ProviderConfig)
RemoveCache removes the cache for the given provider config.
type GVKParserCacheManagerOption ¶
type GVKParserCacheManagerOption func(cache *GVKParserCacheManager)
GVKParserCacheManagerOption lets you configure a *GVKParserCacheManager.
type GvkParser ¶
type GvkParser struct {
// contains filtered or unexported fields
}
GvkParser contains a Parser that allows introspecting the schema.
func NewGVKParser ¶
func NewGVKParser(componentNameToSchema map[string]*spec.Schema, preserveUnknownFields bool) (*GvkParser, error)
NewGVKParser builds a GVKParser from a directory of OpenAPI schema (instead of proto.Models in upstream k8s apimachinery implementation)
This will automatically find the proper version of the object, and the corresponding schema information.
func (*GvkParser) Type ¶
func (p *GvkParser) Type(gvk schema.GroupVersionKind) *typed.ParseableType
Type returns a helper which can produce objects of the given type. Any errors are deferred until a further function is called.