migrate

package
v1.2.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFromCluster

func GetConfigFromCluster(ctx context.Context, opts Options) ([]byte, *corev1.Pod, error)

func Run

func Run(ctx context.Context, status *printer.StatusPrinter, config []byte, opts Options) (string, error)

Run runs the migration process.

Types

type ConfigExporterOptions

type ConfigExporterOptions struct {
	Registry   string
	Repository string
	Tag        string

	Timeout    time.Duration
	PollPeriod time.Duration
}

ConfigExporterOptions holds config exporter image configuration options.

type Converter

type Converter struct{}

Converter converts OS config into GraphQL create input.

func NewConverter

func NewConverter() *Converter

NewConverter returns a new Converter instance.

func (*Converter) ConvertActions

func (c *Converter) ConvertActions(actions bkconfig.Actions) []*gqlModel.ActionCreateUpdateInput

ConvertActions converts Actions.

func (*Converter) ConvertAliases

func (c *Converter) ConvertAliases(aliases bkconfig.Aliases, instanceID string) []*gqlModel.AliasCreateInput

ConvertAliases converts Aliases.

func (*Converter) ConvertPlatforms

func (c *Converter) ConvertPlatforms(platforms map[string]bkconfig.Communications) *gqlModel.PlatformsCreateInput

ConvertPlatforms converts cloud supported platforms.

func (*Converter) ConvertPlugins

func (c *Converter) ConvertPlugins(exec map[string]bkconfig.Executors, sources map[string]bkconfig.Sources) ([]*gqlModel.PluginsCreateInput, error)

ConvertPlugins converts all plugins.

type IndentWriter

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

IndentWriter provides functionality to intercept the underlying writer and add left indention.

func NewIndentWriter

func NewIndentWriter(w io.Writer, indent uint) *IndentWriter

NewIndentWriter returns a new IndentWriter.

func (IndentWriter) Fd

func (e IndentWriter) Fd() uintptr

Fd returns the integer Unix file descriptor referencing the open file.

func (IndentWriter) Write

func (e IndentWriter) Write(p []byte) (int, error)

Writer writes the input p.

type Options

type Options struct {
	Token             string
	InstanceName      string `survey:"instanceName"`
	CloudDashboardURL string
	CloudAPIURL       string
	Namespace         string
	Label             string
	SkipConnect       bool
	SkipOpenBrowser   bool
	AutoApprove       bool
	ConfigExporter    ConfigExporterOptions
}

Options holds migrate possible configuration options.

Jump to

Keyboard shortcuts

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