resourcebuilder

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	ParseGroupResource(resourceArg string) (schema.GroupVersionResource, error)
}

Interface is used to parse resource name

type PersistentRESTClientGetter

type PersistentRESTClientGetter struct {
	RESTConfig               *rest.Config
	CachedDiscoveryInterface discovery.CachedDiscoveryInterface
	RESTMapper               meta.RESTMapper
}

PersistentRESTClientGetter implements RESTClientGetter with persistent clients

func NewPersistentRESTClientGetter

func NewPersistentRESTClientGetter(kubeconfig string) (*PersistentRESTClientGetter, error)

NewPersistentRESTClientGetter creates new PersistentRESTClientGetter

func (*PersistentRESTClientGetter) ToDiscoveryClient

ToDiscoveryClient implements RESTClientGetter

func (*PersistentRESTClientGetter) ToRESTConfig

func (g *PersistentRESTClientGetter) ToRESTConfig() (*rest.Config, error)

ToRESTConfig implements RESTClientGetter

func (*PersistentRESTClientGetter) ToRESTMapper

func (g *PersistentRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)

ToRESTMapper implements RESTClientGetter

type ResourceBuilder

type ResourceBuilder struct {
	ClientGetter resource.RESTClientGetter
}

ResourceBuilder is used to parse resource name

func New

func New(kubeconfig string) (*ResourceBuilder, error)

New creates new ResourceBuilder

func NewFromClientGetter

func NewFromClientGetter(clientGetter resource.RESTClientGetter) (*ResourceBuilder, error)

NewFromClientGetter creates new ResourceBuilder

func (*ResourceBuilder) ParseGroupResource

func (b *ResourceBuilder) ParseGroupResource(resourceArg string) (schema.GroupVersionResource, error)

ParseGroupResource parses resource string as schema.GroupVersionResource,

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL