istio: istio.io/istio/galley/pkg/config/source/kube/rt Index | Files

package rt

import "istio.io/istio/galley/pkg/config/source/kube/rt"

Index

Package Files

adapter.go dynamic.go extract.go known.go origin.go provider.go

func ToResourceEntry Uses

func ToResourceEntry(object metav1.Object, r *schema.KubeResource, item proto.Message) *resource.Entry

ToResourceEntry converts the given object and proto to a resource.Entry

type Adapter Uses

type Adapter struct {
    // contains filtered or unexported fields
}

Adapter provides core functions that are necessary to interact with a Kubernetes resource.

func (*Adapter) ExtractObject Uses

func (p *Adapter) ExtractObject(o interface{}) metav1.Object

ExtractObject extracts the k8s object metadata from the given object of this type.

func (*Adapter) ExtractResource Uses

func (p *Adapter) ExtractResource(o interface{}) (proto.Message, error)

ExtractResource extracts the resource proto from the given object of this type.

func (*Adapter) GetStatus Uses

func (p *Adapter) GetStatus(o interface{}) interface{}

GetStatus returns the status of the resource.

func (*Adapter) IsBuiltIn Uses

func (p *Adapter) IsBuiltIn() bool

IsBuiltIn returns true if the adapter uses built-in client libraries.

func (*Adapter) IsEqual Uses

func (p *Adapter) IsEqual(o1, o2 interface{}) bool

IsEqual checks whether the given two resources are equal

func (*Adapter) JSONToEntry Uses

func (p *Adapter) JSONToEntry(s string) (*resource.Entry, error)

JSONToEntry parses the K8s Resource in JSON form and converts it to resource entry.

func (*Adapter) NewInformer Uses

func (p *Adapter) NewInformer() (cache.SharedInformer, error)

NewInformer creates a new k8s informer for resources of this type.

func (*Adapter) ParseJSON Uses

func (p *Adapter) ParseJSON(input []byte) (interface{}, error)

ParseJSON parses the given JSON into a k8s object of this type.

type Origin Uses

type Origin struct {
    Collection collection.Name
    Kind       string
    Name       resource.Name
    Version    resource.Version
}

Origin is a K8s specific implementation of resource.Origin

func (*Origin) FriendlyName Uses

func (o *Origin) FriendlyName() string

FriendlyName implements resource.Origin

func (*Origin) Namespace Uses

func (o *Origin) Namespace() string

Namespace implements resource.Origin

type Provider Uses

type Provider struct {
    // contains filtered or unexported fields
}

Provider for adapters. It closes over K8s connection-related infrastructure.

func DefaultProvider Uses

func DefaultProvider() *Provider

DefaultProvider returns a default provider that has no K8s connectivity enabled.

func NewProvider Uses

func NewProvider(interfaces kube.Interfaces, resyncPeriod time.Duration) *Provider

NewProvider returns a new instance of Provider.

func (*Provider) GetAdapter Uses

func (p *Provider) GetAdapter(r schema.KubeResource) *Adapter

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 (*Provider) GetDynamicResourceInterface Uses

func (p *Provider) GetDynamicResourceInterface(r schema.KubeResource) (dynamic.NamespaceableResourceInterface, error)

GetDynamicResourceInterface returns a dynamic.NamespaceableResourceInterface for the given resource.

Package rt imports 28 packages (graph) and is imported by 4 packages. Updated 2019-10-16. Refresh now. Tools for package owners.