provider

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeProvider

type FakeProvider struct {
	InvClient *inventory.FakeInventoryClient
	// contains filtered or unexported fields
}

func NewFakeProvider

func NewFakeProvider(f util.Factory, objs []object.ObjMetadata) *FakeProvider

func (*FakeProvider) Factory

func (f *FakeProvider) Factory() util.Factory

func (*FakeProvider) InventoryClient

func (f *FakeProvider) InventoryClient() (inventory.InventoryClient, error)

func (*FakeProvider) ManifestReader added in v0.20.3

func (f *FakeProvider) ManifestReader(reader io.Reader, args []string) (manifestreader.ManifestReader, error)

func (*FakeProvider) ToRESTMapper

func (f *FakeProvider) ToRESTMapper() (meta.RESTMapper, error)

type InventoryProvider

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

InventoryProvider implements the Provider interface.

func NewProvider

func NewProvider(f util.Factory, invFactoryFunc inventory.InventoryFactoryFunc) *InventoryProvider

NewProvider encapsulates the passed values, and returns a pointer to an Provider.

func (*InventoryProvider) Factory

func (f *InventoryProvider) Factory() util.Factory

Factory returns the kubectl factory.

func (*InventoryProvider) InventoryClient

func (f *InventoryProvider) InventoryClient() (inventory.InventoryClient, error)

InventoryClient returns an InventoryClient created with the stored factory and InventoryFactoryFunc values, or an error if one occurred.

func (*InventoryProvider) ManifestReader added in v0.20.3

func (f *InventoryProvider) ManifestReader(reader io.Reader, args []string) (manifestreader.ManifestReader, error)

func (*InventoryProvider) ToRESTMapper

func (f *InventoryProvider) ToRESTMapper() (meta.RESTMapper, error)

ToRESTMapper returns a RESTMapper created by the stored kubectl factory.

type Provider

type Provider interface {
	Factory() util.Factory
	InventoryClient() (inventory.InventoryClient, error)
	ToRESTMapper() (meta.RESTMapper, error)
	ManifestReader(reader io.Reader, args []string) (manifestreader.ManifestReader, error)
}

Provider is an interface which wraps the kubectl factory and the inventory client.

Jump to

Keyboard shortcuts

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