sonobuoy: github.com/heptio/sonobuoy/pkg/dynamic Index | Files

package dynamic

import "github.com/heptio/sonobuoy/pkg/dynamic"

Index

Package Files

client.go

type APIHelper Uses

type APIHelper struct {
    Client          dynamic.Interface
    DiscoveryClient discovery.DiscoveryInterface

    Mapper   mapper
    Accessor MetadataAccessor
}

APIHelper wraps the client-go dynamic client and exposes a simple interface.

func NewAPIHelper Uses

func NewAPIHelper(dyn dynamic.Interface, mapper mapper, accessor MetadataAccessor) (*APIHelper, error)

NewAPIHelper returns an APIHelper with the internals instantiated.

func NewAPIHelperFromRESTConfig Uses

func NewAPIHelperFromRESTConfig(cfg *rest.Config) (*APIHelper, error)

NewAPIHelperFromRESTConfig creates a new APIHelper with default objects from client-go.

func (*APIHelper) CreateObject Uses

func (a *APIHelper) CreateObject(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)

CreateObject attempts to create any kubernetes object.

func (*APIHelper) Name Uses

func (a *APIHelper) Name(obj *unstructured.Unstructured) (string, error)

Name returns the name of the kubernetes object.

func (*APIHelper) Namespace Uses

func (a *APIHelper) Namespace(obj *unstructured.Unstructured) (string, error)

Namespace returns the namespace of the kubernetes object.

func (*APIHelper) ResourceVersion Uses

func (a *APIHelper) ResourceVersion(obj *unstructured.Unstructured) (string, error)

ResourceVersion returns the resource version of a kubernetes object.

type MetadataAccessor Uses

type MetadataAccessor interface {
    Namespace(runtime.Object) (string, error)
    Name(runtime.Object) (string, error)
    ResourceVersion(runtime.Object) (string, error)
}

A scoped down meta.MetadataAccessor

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