context

package
v0.0.0-...-e73b65a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// Host client.
	k8sclient.Client
	// Plan.
	Plan *api.Plan
	// Map.
	Map struct {
		// Network
		Network *api.NetworkMap
		// Storage
		Storage *api.StorageMap
	}
	// Migration
	Migration *api.Migration
	// Source.
	Source Source
	// Destination.
	Destination Destination
	// Hooks.
	Hooks []*api.Hook
	// Logger.
	Log logr.Logger
}

Plan execution context.

func New

func New(
	client k8sclient.Client, plan *api.Plan, log logr.Logger) (ctx *Context, err error)

Factory.

func (*Context) FindHook

func (r *Context) FindHook(ref core.ObjectReference) (hook *api.Hook, found bool)

Find a Hook by ref.

func (*Context) SetMigration

func (r *Context) SetMigration(migration *api.Migration)

Set the migration. This will update the logger context.

type Destination

type Destination struct {
	// Remote client.
	k8sclient.Client
	// Provider.
	Provider *api.Provider
	// Provider API client.
	Inventory web.Client
}

Destination.

type NotEnoughDataError

type NotEnoughDataError struct {
}

Not enough data to build the context.

func (NotEnoughDataError) Error

func (e NotEnoughDataError) Error() string

type Source

type Source struct {
	// Provider
	Provider *api.Provider
	// Provider API client.
	Inventory web.Client
	// Provider Secret.
	Secret *core.Secret
}

Source.

Jump to

Keyboard shortcuts

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