envfuncsext

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCronBackupPaused added in v1.8.1

func CheckCronBackupPaused(incremental bool, opts ...NebulaBackupOption) env.Func

func CreateObject

func CreateObject(obj k8s.Object) env.Func

func CreateServiceAccount added in v1.8.1

func CreateServiceAccount(namespace, name string) env.Func

func DefaultNebulaClusterReadyFunc

func DefaultNebulaClusterReadyFunc(ctx context.Context, cfg *envconf.Config, nc *appsv1alpha1.NebulaCluster) (bool, error)

func DeleteNebulaBackup added in v1.8.1

func DeleteNebulaBackup(incremental bool) env.Func

func DeleteNebulaCronBackup added in v1.8.1

func DeleteNebulaCronBackup(incremental bool) env.Func

func DeleteNebulaRestore added in v1.8.1

func DeleteNebulaRestore() env.Func

func DeleteNebulaRestoredCluster added in v1.8.1

func DeleteNebulaRestoredCluster() env.Func

func DeleteObject

func DeleteObject(obj k8s.Object) env.Func

func DeleteServiceAccount added in v1.8.1

func DeleteServiceAccount(namespace, name string) env.Func

func DeployNebulaBackup added in v1.8.1

func DeployNebulaBackup(incremental bool, nbCtx NebulaBackupInstallOptions) env.Func

func DeployNebulaCronBackup added in v1.8.1

func DeployNebulaCronBackup(incremental bool, nbCtx NebulaBackupInstallOptions) env.Func

func DeployNebulaRestore added in v1.8.1

func DeployNebulaRestore(nbCtx NebulaRestoreInstallOptions) env.Func

func HelmInstall

func HelmInstall(opts ...HelmOption) env.Func

func HelmUninstall

func HelmUninstall(opts ...HelmOption) env.Func

func HelmUpgrade

func HelmUpgrade(opts ...HelmOption) env.Func

func IgnoreAlreadyExists

func IgnoreAlreadyExists(ctx context.Context, err error) env.Func

func IgnoreErrors

func IgnoreErrors(ctx context.Context, err error, isErrors ...func(error) bool) env.Func

func IgnoreNotFound

func IgnoreNotFound(ctx context.Context, err error) env.Func

func ImportData

func ImportData(opts ...ImporterOption) env.Func

func ImportLDBC

func ImportLDBC(opts ...ImporterOption) env.Func

func InstallCluster

func InstallCluster(opts ...ClusterOption) env.Func

func InstallNebulaCluster

func InstallNebulaCluster(opts ...NebulaClusterOption) env.Func

func InstallOperator

func InstallOperator(opts ...OperatorOption) env.Func

func NGResultsEqual added in v1.8.1

func NGResultsEqual(resA, resB nebulaclient.ResultSet) bool

func PrintCommandResults added in v1.8.1

func PrintCommandResults(res nebulaclient.ResultSet)

func RunGetStats added in v1.8.1

func RunGetStats(ctx context.Context, cfg *envconf.Config, space string, ngOptions NebulaCommandOptions) (*nebulaclient.ResultSet, error)

func RunNGCommand added in v1.8.1

func RunNGCommand(cmdCtx NebulaCommandOptions, cmd string) env.Func

func SetCronBackupPause added in v1.8.1

func SetCronBackupPause(incremental, pause bool) env.Func

func UninstallCluster

func UninstallCluster(opts ...ClusterOption) env.Func

func UninstallNebulaCluster

func UninstallNebulaCluster(opts ...NebulaClusterOption) env.Func

func UninstallOperator

func UninstallOperator(opts ...OperatorOption) env.Func

func UpgradeNebulaCluster

func UpgradeNebulaCluster(opts ...NebulaClusterOption) env.Func

func WaitForCleanBackup added in v1.8.1

func WaitForCleanBackup(incremental bool, opts ...NebulaBackupOption) env.Func

func WaitForCleanCronBackup added in v1.8.1

func WaitForCleanCronBackup(incremental bool, opts ...NebulaBackupOption) env.Func

func WaitNebulaBackupFinished added in v1.8.1

func WaitNebulaBackupFinished(incremental bool, opts ...NebulaBackupOption) env.Func

func WaitNebulaClusterReady

func WaitNebulaClusterReady(opts ...NebulaClusterOption) env.Func

func WaitNebulaCronBackupFinished added in v1.8.1

func WaitNebulaCronBackupFinished(incremental bool, opts ...NebulaBackupOption) env.Func

func WaitNebulaRestoreFinished added in v1.8.1

func WaitNebulaRestoreFinished(opts ...NebulaRestoreOption) env.Func

Types

type ClusterCtxValue

type ClusterCtxValue struct {
	Name string
}

func GetClusterCtxValue

func GetClusterCtxValue(ctx context.Context) *ClusterCtxValue

type ClusterOption

type ClusterOption func(*ClusterOptions)

func WithClusterKindConfigPath

func WithClusterKindConfigPath(kindConfigPath string) ClusterOption

func WithClusterNamePrefix

func WithClusterNamePrefix(namePrefix string) ClusterOption

type ClusterOptions

type ClusterOptions struct {
	Name           string
	NamePrefix     string
	KindConfigPath string
}

func (*ClusterOptions) WithOptions

func (o *ClusterOptions) WithOptions(opts ...ClusterOption) *ClusterOptions

type HelmOption

type HelmOption func(*HelmOptions)

func WithHelmOptions

func WithHelmOptions(opts ...helm.Option) HelmOption

type HelmOptions

type HelmOptions struct {
	HelmOptions []helm.Option
}

func (*HelmOptions) RawHelmOpts

func (o *HelmOptions) RawHelmOpts() *helm.Opts

func (*HelmOptions) WithOptions

func (o *HelmOptions) WithOptions(opts ...HelmOption) *HelmOptions

type ImporterOption

type ImporterOption func(*ImporterOptions)

func WithImporterClientAddress

func WithImporterClientAddress(address string) ImporterOption

func WithImporterClientUserPassword

func WithImporterClientUserPassword(user, password string) ImporterOption

func WithImporterConfig

func WithImporterConfig(importerConfig importerconfig.Configurator) ImporterOption

func WithImporterConfigUpdate

func WithImporterConfigUpdate(fns ...func(importerconfig.Configurator)) ImporterOption

func WithImporterInitContainers

func WithImporterInitContainers(initContainers ...corev1.Container) ImporterOption

func WithImporterName

func WithImporterName(name string) ImporterOption

func WithImporterNamespace

func WithImporterNamespace(namespace string) ImporterOption

func WithImporterWaitOptions

func WithImporterWaitOptions(opts ...wait.Option) ImporterOption

type ImporterOptions

type ImporterOptions struct {
	Name              string
	Namespace         string
	Image             string
	Config            importerconfig.Configurator
	ConfigUpdateFuncs []func(importerconfig.Configurator)
	DataDir           string
	InitContainers    []corev1.Container
	WaitOptions       []wait.Option
}

func DefaultImporterOptions

func DefaultImporterOptions() *ImporterOptions

func (*ImporterOptions) WithOptions

func (o *ImporterOptions) WithOptions(opts ...ImporterOption) *ImporterOptions

type NebulaBackupCtxValue added in v1.8.1

type NebulaBackupCtxValue struct {
	// general fields
	Name            string
	Namespace       string
	BackupFileName  string
	StorageType     string
	BucketName      string
	Region          string
	CleanBackupData bool

	// for cron backup only
	Schedule            string
	TestPause           bool
	TriggeredBackupName string
	BackupSpec          appsv1alpha1.BackupSpec
}

func GetNebulaBackupCtxValue added in v1.8.1

func GetNebulaBackupCtxValue(incremental bool, ctx context.Context) *NebulaBackupCtxValue

type NebulaBackupInstallOptions added in v1.8.1

type NebulaBackupInstallOptions struct {
	Name          string
	Namespace     string
	Spec          appsv1alpha1.BackupSpec
	CronBackupOps *NebulaCronBackupOptions
}

type NebulaBackupOption added in v1.8.1

type NebulaBackupOption func(*NebulaBackupOptions)

func WithNebulaBackupWaitOptions added in v1.8.1

func WithNebulaBackupWaitOptions(opts ...wait.Option) NebulaBackupOption

type NebulaBackupOptions added in v1.8.1

type NebulaBackupOptions struct {
	WaitOptions []wait.Option
}

func (*NebulaBackupOptions) WithOptions added in v1.8.1

type NebulaClusterCtxValue

type NebulaClusterCtxValue struct {
	Name      string
	Namespace string
}

func GetNebulaClusterCtxValue

func GetNebulaClusterCtxValue(ctx context.Context) *NebulaClusterCtxValue

type NebulaClusterOption

type NebulaClusterOption func(*NebulaClusterOptions)

func WithNebulaClusterHelmOptions

func WithNebulaClusterHelmOptions(opts ...HelmOption) NebulaClusterOption

func WithNebulaClusterHelmRawOptions

func WithNebulaClusterHelmRawOptions(opts ...helm.Option) NebulaClusterOption

func WithNebulaClusterReadyFuncs

func WithNebulaClusterReadyFuncs(fns ...NebulaClusterReadyFunc) NebulaClusterOption

func WithNebulaClusterWaitOptions

func WithNebulaClusterWaitOptions(opts ...wait.Option) NebulaClusterOption

type NebulaClusterOptions

type NebulaClusterOptions struct {
	HelmOptions []HelmOption
	ReadyFuncs  []NebulaClusterReadyFunc
	WaitOptions []wait.Option
}

func (*NebulaClusterOptions) WithOptions

type NebulaClusterReadyFunc

type NebulaClusterReadyFunc func(context.Context, *envconf.Config, *appsv1alpha1.NebulaCluster) (bool, error)

func NebulaClusterReadyFuncForFields

func NebulaClusterReadyFuncForFields(ignoreValidationErrors bool, matchersMapping map[string]any) NebulaClusterReadyFunc

type NebulaCommandCtxValue added in v1.8.1

type NebulaCommandCtxValue struct {
	Results nebulaclient.ResultSet
}

func GetNebulaCommandCtxValue added in v1.8.1

func GetNebulaCommandCtxValue(clusterNamespace, clusterName string, ctx context.Context) *NebulaCommandCtxValue

type NebulaCommandOptions added in v1.8.1

type NebulaCommandOptions struct {
	ClusterName      string
	ClusterNamespace string
	Username         string
	Password         string
	Space            string
}

type NebulaCronBackupOptions added in v1.8.1

type NebulaCronBackupOptions struct {
	Schedule  string
	TestPause bool
}

type NebulaRestoreCtxValue added in v1.8.1

type NebulaRestoreCtxValue struct {
	Name                    string
	Namespace               string
	BackupFileName          string
	StorageType             string
	BucketName              string
	RestoreClusterNamespace string
	RestoreClusterName      string
}

func GetNebulaRestoreCtxValue added in v1.8.1

func GetNebulaRestoreCtxValue(ctx context.Context) *NebulaRestoreCtxValue

type NebulaRestoreInstallOptions added in v1.8.1

type NebulaRestoreInstallOptions struct {
	Name      string
	Namespace string
	Spec      appsv1alpha1.RestoreSpec
}

type NebulaRestoreOption added in v1.8.1

type NebulaRestoreOption func(*NebulaRestoreOptions)

func WithNebulaRestoreWaitOptions added in v1.8.1

func WithNebulaRestoreWaitOptions(opts ...wait.Option) NebulaRestoreOption

type NebulaRestoreOptions added in v1.8.1

type NebulaRestoreOptions struct {
	WaitOptions []wait.Option
}

func (*NebulaRestoreOptions) WithOptions added in v1.8.1

type ObjectOption

type ObjectOption func(*ObjectOptions)

func WithObjectCreateOptions

func WithObjectCreateOptions(opts ...resources.CreateOption) ObjectOption

func WithObjectDeleteOptions

func WithObjectDeleteOptions(opts ...resources.DeleteOption) ObjectOption

type ObjectOptions

type ObjectOptions struct {
	CreateOptions []resources.CreateOption
	DeleteOptions []resources.DeleteOption
}

func (*ObjectOptions) WithOptions

func (o *ObjectOptions) WithOptions(opts ...ObjectOption) *ObjectOptions

type OperatorCtxValue

type OperatorCtxValue struct {
	Name      string
	Namespace string
}

func GetOperatorCtxValue

func GetOperatorCtxValue(ctx context.Context) *OperatorCtxValue

type OperatorOption

type OperatorOption func(*OperatorOptions)

func WithOperatorHelmOptions

func WithOperatorHelmOptions(opts ...HelmOption) OperatorOption

func WithOperatorHelmRawOptions

func WithOperatorHelmRawOptions(opts ...helm.Option) OperatorOption

type OperatorOptions

type OperatorOptions struct {
	HelmOptions []HelmOption
}

func (*OperatorOptions) WithOptions

func (o *OperatorOptions) WithOptions(opts ...OperatorOption) *OperatorOptions

Jump to

Keyboard shortcuts

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