snapshot

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Overview

Package snapshot provides components for preparing initial snapshots.

Package snapshot provides components for preparing initial snapshots.

Package snapshot provides components for preparing initial snapshots.

Index

Constants

View Source
const (
	// LogicalSnapshotType declares a job type for preparing a logical initial snapshot.
	LogicalSnapshotType = "logicalSnapshot"
)
View Source
const (
	// PhysicalSnapshotType declares a job type for preparing a physical snapshot.
	PhysicalSnapshotType = "physicalSnapshot"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPatching

type DataPatching struct {
	DockerImage        string                 `yaml:"dockerImage"`
	QueryPreprocessing QueryPreprocessing     `yaml:"queryPreprocessing"`
	ContainerConfig    map[string]interface{} `yaml:"containerConfig"`
}

DataPatching allows executing queries to transform data before snapshot taking.

type HealthCheck

type HealthCheck struct {
	Interval   int64 `yaml:"interval"`
	MaxRetries int   `yaml:"maxRetries"`
}

HealthCheck describes health check options of a promotion.

type LogicalInitial

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

LogicalInitial describes a job for preparing a logical initial snapshot.

func NewLogicalInitialJob

func NewLogicalInitialJob(cfg config.JobConfig, global *global.Config, engineProps global.EngineProps, cloneManager pool.FSManager,
	tm *telemetry.Agent) (*LogicalInitial, error)

NewLogicalInitialJob creates a new logical initial job.

func (*LogicalInitial) Name

func (s *LogicalInitial) Name() string

Name returns a name of the job.

func (*LogicalInitial) Reload

func (s *LogicalInitial) Reload(cfg map[string]interface{}) (err error)

Reload reloads job configuration.

func (*LogicalInitial) Run

func (s *LogicalInitial) Run(ctx context.Context) error

Run starts the job.

type LogicalOptions

type LogicalOptions struct {
	DataPatching        DataPatching      `yaml:"dataPatching"`
	PreprocessingScript string            `yaml:"preprocessingScript"`
	Configs             map[string]string `yaml:"configs"`
	Schedule            Scheduler         `yaml:"schedule"`
}

LogicalOptions describes options for a logical initialization job.

type PhysicalInitial

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

PhysicalInitial describes a job for preparing a physical initial snapshot.

func NewPhysicalInitialJob

func NewPhysicalInitialJob(cfg config.JobConfig, global *global.Config, engineProps global.EngineProps, cloneManager pool.FSManager,
	tm *telemetry.Agent) (*PhysicalInitial, error)

NewPhysicalInitialJob creates a new physical initial job.

func (*PhysicalInitial) Name

func (p *PhysicalInitial) Name() string

Name returns a name of the job.

func (*PhysicalInitial) Reload

func (p *PhysicalInitial) Reload(cfg map[string]interface{}) (err error)

Reload reloads job configuration.

func (*PhysicalInitial) Run

func (p *PhysicalInitial) Run(ctx context.Context) (err error)

Run starts the job.

type PhysicalOptions

type PhysicalOptions struct {
	SkipStartSnapshot   bool              `yaml:"skipStartSnapshot"`
	Promotion           Promotion         `yaml:"promotion"`
	PreprocessingScript string            `yaml:"preprocessingScript"`
	Configs             map[string]string `yaml:"configs"`
	Sysctls             map[string]string `yaml:"sysctls"`
	Envs                map[string]string `yaml:"envs"`
	Scheduler           *Scheduler        `yaml:"scheduler"`
}

PhysicalOptions describes options for a physical initialization job.

type Promotion

type Promotion struct {
	Enabled            bool                   `yaml:"enabled"`
	DockerImage        string                 `yaml:"dockerImage"`
	ContainerConfig    map[string]interface{} `yaml:"containerConfig"`
	HealthCheck        HealthCheck            `yaml:"healthCheck"`
	QueryPreprocessing QueryPreprocessing     `yaml:"queryPreprocessing"`
	Configs            map[string]string      `yaml:"configs"`
	Recovery           map[string]string      `yaml:"recovery"`
}

Promotion describes promotion options.

type QueryPreprocessing

type QueryPreprocessing struct {
	QueryPath          string `yaml:"queryPath"`
	MaxParallelWorkers int    `yaml:"maxParallelWorkers"`
}

QueryPreprocessing defines query preprocessing options.

type ScheduleSpec

type ScheduleSpec struct {
	Timetable string `yaml:"timetable"`
	Limit     int    `yaml:"limit"`
}

ScheduleSpec defines options to set up scheduler components.

type Scheduler

type Scheduler struct {
	Snapshot  ScheduleSpec `yaml:"snapshot"`
	Retention ScheduleSpec `yaml:"retention"`
}

Scheduler provides scheduler options.

Jump to

Keyboard shortcuts

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