import "istio.io/istio/galley/pkg/config/source/kube/rt"
adapter.go dynamic.go extract.go known.go origin.go provider.go
func ToResource(object metav1.Object, schema collection.Schema, item proto.Message, source resource.Reference, fieldMap map[string]int) *resource.Instance
ToResource converts the given object and proto to a resource.Instance
type Adapter struct {
// contains filtered or unexported fields
}
Adapter provides core functions that are necessary to interact with a Kubernetes resource.
ExtractObject extracts the k8s object metadata from the given object of this type.
ExtractResource extracts the resource proto from the given object of this type.
GetStatus returns the status of the resource.
IsBuiltIn returns true if the adapter uses built-in client libraries.
IsDefaultExcluded returns true if the adapter is excluded from the default set of resources to watch.
IsEqual checks whether the given two resources are equal
IsRequiredForServiceDiscovery returns true if the adapter is required for service discovery.
JSONToEntry parses the K8s Resource in JSON form and converts it to resource entry.
func (p *Adapter) NewInformer() (cache.SharedInformer, error)
NewInformer creates a new k8s informer for resources of this type.
ParseJSON parses the given JSON into a k8s object of this type.
type Origin struct { Collection collection.Name Kind string FullName resource.FullName Version resource.Version Ref resource.Reference FieldsMap map[string]int }
Origin is a K8s specific implementation of resource.Origin
GetFieldMap implements resource.Origin
FriendlyName implements resource.Origin
Namespace implements resource.Origin
Reference implements resource.Origin
type Position struct { Filename string // filename, if any Line int // line number, starting at 1 }
Position is a representation of the location of a source.
String outputs the string representation of the position.
type Provider struct {
// contains filtered or unexported fields
}
Provider for adapters. It closes over K8s connection-related infrastructure.
DefaultProvider returns a default provider that has no K8s connectivity enabled.
func NewProvider(interfaces kube.Interfaces, namespaces string, resyncPeriod time.Duration) *Provider
NewProvider returns a new instance of Provider.
GetAdapter returns a type for the group/kind. If the type is a well-known type, then the returned type will have a specialized implementation. Otherwise, it will be using the dynamic conversion logic.
func (p *Provider) GetDynamicResourceInterface(r resource.Schema) (dynamic.NamespaceableResourceInterface, error)
GetDynamicResourceInterface returns a dynamic.NamespaceableResourceInterface for the given resource.
Package rt imports 32 packages (graph) and is imported by 5 packages. Updated 2020-10-15. Refresh now. Tools for package owners.