Help us shape the future of Go! Take the 2026 Go Developer Survey

physical

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package physical provides jobs for physical initial operations.

Index

Constants

View Source
const (
	// RestoreJobType defines the physical job type.
	RestoreJobType = "physicalRestore"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyOptions

type CopyOptions struct {
	Tool        string            `yaml:"tool"`
	DockerImage string            `yaml:"dockerImage"`
	Envs        map[string]string `yaml:"envs"`
	WALG        walgOptions       `yaml:"walg"`
	CustomTool  customOptions     `yaml:"customTool"`
	Sync        Sync              `yaml:"sync"`
}

CopyOptions describes options for physical copying.

type HealthCheck

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

HealthCheck describes health check options of a sync instance.

type RestoreJob

type RestoreJob struct {
	CopyOptions
	// contains filtered or unexported fields
}

RestoreJob describes a job for physical restoring.

func NewJob

func NewJob(cfg config.JobConfig, global *global.Config) (*RestoreJob, error)

NewJob creates a new physical restore job.

func (*RestoreJob) Name

func (r *RestoreJob) Name() string

Name returns a name of the job.

func (*RestoreJob) Reload

func (r *RestoreJob) Reload(cfg map[string]interface{}) (err error)

Reload reloads job configuration.

func (*RestoreJob) Run

func (r *RestoreJob) Run(ctx context.Context) (err error)

Run starts the job.

type Sync

type Sync struct {
	Enabled     bool              `yaml:"enabled"`
	HealthCheck HealthCheck       `yaml:"healthCheck"`
	Configs     map[string]string `yaml:"configs"`
	Recovery    map[string]string `yaml:"recovery"`
}

Sync describes sync instance options.

Jump to

Keyboard shortcuts

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