importer

package
v0.0.0-...-7ada044 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPlaneStateImporter

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

ControlPlaneStateImporter is the importer for control plane state.

func NewControlPlaneStateImporter

func NewControlPlaneStateImporter(dynamicClient dynamic.Interface, discoveryClient discovery.DiscoveryInterface, appsClient appsv1.AppsV1Interface, mapper meta.ResettableRESTMapper, opts Options) *ControlPlaneStateImporter

NewControlPlaneStateImporter creates a new importer for control plane state.

func (*ControlPlaneStateImporter) Import

Import imports the control plane state.

func (*ControlPlaneStateImporter) PreflightChecks

func (im *ControlPlaneStateImporter) PreflightChecks(ctx context.Context) []error

type FileSystemReader

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

func NewFileSystemReader

func NewFileSystemReader(fs afero.Afero) *FileSystemReader

func (*FileSystemReader) ReadResources

func (g *FileSystemReader) ReadResources(groupResource string) (resources []unstructured.Unstructured, meta *v1alpha1.TypeMeta, rErr error)

type Options

type Options struct {
	// InputArchive is the path to the archive to be imported.
	InputArchive string // default: xp-state.tar.gz
	// UnpauseAfterImport indicates whether to unpause all managed resources after import.
	UnpauseAfterImport bool // default: false
}

Options are the options for the import command.

type PausingResourceImporter

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

func (*PausingResourceImporter) ImportResources

func (im *PausingResourceImporter) ImportResources(ctx context.Context, gr string, restoreStatus bool) (int, error)

type ResourceApplier

type ResourceApplier interface {
	ApplyResources(ctx context.Context, resources []unstructured.Unstructured, applyStatus bool) error
	ModifyResources(ctx context.Context, resources []unstructured.Unstructured, modify func(*unstructured.Unstructured) error) error
}

type ResourceImporter

type ResourceImporter interface {
	ImportResources(ctx context.Context, gr string, restoreStatus bool) (int, error)
}

type ResourceReader

type ResourceReader interface {
	ReadResources(groupResource string) (resources []unstructured.Unstructured, meta *v1alpha1.TypeMeta, err error)
}

type UnstructuredResourceApplier

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

func NewUnstructuredResourceApplier

func NewUnstructuredResourceApplier(dynamicClient dynamic.Interface, resourceMapper meta.RESTMapper) *UnstructuredResourceApplier

func (*UnstructuredResourceApplier) ApplyResources

func (a *UnstructuredResourceApplier) ApplyResources(ctx context.Context, resources []unstructured.Unstructured, applyStatus bool) error

func (*UnstructuredResourceApplier) ModifyResources

func (a *UnstructuredResourceApplier) ModifyResources(ctx context.Context, resources []unstructured.Unstructured, modify func(*unstructured.Unstructured) error) error

Jump to

Keyboard shortcuts

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