istio: Index | Files

package rt

import ""


Package Files

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

func ToResource Uses

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 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) IsDefaultExcluded Uses

func (p *Adapter) IsDefaultExcluded() bool

IsDefaultExcluded returns true if the adapter is excluded from the default set of resources to watch.

func (*Adapter) IsEqual Uses

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

IsEqual checks whether the given two resources are equal

func (*Adapter) IsRequiredForServiceDiscovery Uses

func (p *Adapter) IsRequiredForServiceDiscovery() bool

IsRequiredForServiceDiscovery returns true if the adapter is required for service discovery.

func (*Adapter) JSONToEntry Uses

func (p *Adapter) JSONToEntry(s string) (*resource.Instance, 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
    FullName   resource.FullName
    Version    resource.Version
    Ref        resource.Reference
    FieldsMap  map[string]int

Origin is a K8s specific implementation of resource.Origin

func (*Origin) FieldMap Uses

func (o *Origin) FieldMap() map[string]int

GetFieldMap implements resource.Origin

func (*Origin) FriendlyName Uses

func (o *Origin) FriendlyName() string

FriendlyName implements resource.Origin

func (*Origin) Namespace Uses

func (o *Origin) Namespace() resource.Namespace

Namespace implements resource.Origin

func (*Origin) Reference Uses

func (o *Origin) Reference() resource.Reference

Reference implements resource.Origin

type Position Uses

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.

func (*Position) String Uses

func (p *Position) String() string

String outputs the string representation of the position.

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, namespaces string, resyncPeriod time.Duration) *Provider

NewProvider returns a new instance of Provider.

func (*Provider) GetAdapter Uses

func (p *Provider) GetAdapter(r resource.Schema) *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 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.