opts

package
v1.1.0-beta.0...-2a72e7f Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package opts contains all kinds of options definitions that can affect the behavior of restore & get infos.

Package opts contains all kinds of options definitions that can affect the behavior of restore & get infos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetPreInfoConfig

type GetPreInfoConfig struct {
	IgnoreDBNotExist bool
	ForceReloadCache bool
}

GetPreInfoConfig stores some configs to affect behavior to get pre restore infos.

func NewDefaultGetPreInfoConfig

func NewDefaultGetPreInfoConfig() *GetPreInfoConfig

NewDefaultGetPreInfoConfig returns the default get-pre-info config.

func (*GetPreInfoConfig) Clone

func (c *GetPreInfoConfig) Clone() *GetPreInfoConfig

Clone clones a new independent config object from the original one.

type GetPreInfoOption

type GetPreInfoOption func(c *GetPreInfoConfig)

GetPreInfoOption defines the type for passing optional arguments for PreInfoGetter methods.

func ForceReloadCache

func ForceReloadCache(forceReloadCache bool) GetPreInfoOption

ForceReloadCache sets whether to reload the cache for some caching results.

func WithIgnoreDBNotExist

func WithIgnoreDBNotExist(ignoreDBNotExist bool) GetPreInfoOption

WithIgnoreDBNotExist sets whether to ignore DB not exist error when getting DB schemas.

type PrecheckItemBuilderConfig

type PrecheckItemBuilderConfig struct {
	PreInfoGetterOptions []GetPreInfoOption
	MDLoaderSetupOptions []mydump.MDLoaderSetupOption
}

PrecheckItemBuilderConfig defines the config used in a precheck builder, which affects the behavior for executing precheck items.

type PrecheckItemBuilderOption

type PrecheckItemBuilderOption func(c *PrecheckItemBuilderConfig)

PrecheckItemBuilderOption defines the options when constructing a precheck builder, which affects the behavior for executing precheck items.

func WithMDLoaderSetupOptions

func WithMDLoaderSetupOptions(opts ...mydump.MDLoaderSetupOption) PrecheckItemBuilderOption

WithMDLoaderSetupOptions generates a precheck item builder option to control the mydumper loader setup behaviors.

func WithPreInfoGetterOptions

func WithPreInfoGetterOptions(opts ...GetPreInfoOption) PrecheckItemBuilderOption

WithPreInfoGetterOptions generates a precheck item builder option to control the get pre info behaviors.

Jump to

Keyboard shortcuts

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