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 ¶
func (im *ControlPlaneStateImporter) Import(ctx context.Context) error
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 NewPausingResourceImporter ¶
func NewPausingResourceImporter(r ResourceReader, a ResourceApplier) *PausingResourceImporter
func (*PausingResourceImporter) ImportResources ¶
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 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
Click to show internal directories.
Click to hide internal directories.