retrieval

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: 28 Imported by: 0

Documentation

Overview

Package retrieval provides data retrieval pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidConfig

func IsValidConfig(cfg *dblabCfg.Config) error

IsValidConfig checks if the retrieval configuration is valid.

Types

type Retrieval

type Retrieval struct {
	Scheduler Scheduler
	State     State
	// contains filtered or unexported fields
}

Retrieval describes a data retrieval.

func New

func New(cfg *dblabCfg.Config, engineProps global.EngineProps, docker *client.Client, pm *pool.Manager, tm *telemetry.Agent,
	runner runners.Runner) *Retrieval

New creates a new data retrieval.

func (*Retrieval) CollectRestoreTelemetry

func (r *Retrieval) CollectRestoreTelemetry() telemetry.Restore

CollectRestoreTelemetry collect restore data.

func (*Retrieval) Reload

func (r *Retrieval) Reload(ctx context.Context, cfg *dblabCfg.Config)

Reload reloads retrieval configuration.

func (*Retrieval) Run

func (r *Retrieval) Run(ctx context.Context) error

Run start retrieving process.

func (*Retrieval) Stop

func (r *Retrieval) Stop()

Stop stops a retrieval service.

type Scheduler

type Scheduler struct {
	Cron *cron.Cron
	Spec cron.Schedule
}

Scheduler defines a refresh scheduler.

type SkipRefreshingError

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

SkipRefreshingError defines an error when data refreshing is skipped.

func NewSkipRefreshingError

func NewSkipRefreshingError(msg string) *SkipRefreshingError

NewSkipRefreshingError creates a new SkipRefreshingError.

func (*SkipRefreshingError) Error

func (e *SkipRefreshingError) Error() string

Error returns error message.

type State

type State struct {
	Mode        models.RetrievalMode
	Status      models.RetrievalStatus
	LastRefresh *time.Time
	// contains filtered or unexported fields
}

State contains state of retrieval service.

func (*State) Alerts

func (s *State) Alerts() map[models.AlertType]models.Alert

Alerts returns all registered retrieval alerts.

Directories

Path Synopsis
Package components provides the key components of data retrieval.
Package components provides the key components of data retrieval.
Package config contains configuration options of the data retrieval.
Package config contains configuration options of the data retrieval.
Package dbmarker provides a tool for marking database data.
Package dbmarker provides a tool for marking database data.
Package engine provides different engines.
Package engine provides different engines.
postgres
Package postgres contains data retrieval jobs for a Postgres engine.
Package postgres contains data retrieval jobs for a Postgres engine.
postgres/logical
Package logical provides jobs for logical initial operations.
Package logical provides jobs for logical initial operations.
postgres/physical
Package physical provides jobs for physical initial operations.
Package physical provides jobs for physical initial operations.
postgres/snapshot
Package snapshot provides components for preparing initial snapshots.
Package snapshot provides components for preparing initial snapshots.
postgres/tools
Package tools provides helpers to initialize data.
Package tools provides helpers to initialize data.
postgres/tools/cont
Package cont provides tools to manage service containers started by Database Lab Engine.
Package cont provides tools to manage service containers started by Database Lab Engine.
postgres/tools/db
Package db provides database helpers.
Package db provides database helpers.
postgres/tools/defaults
Package defaults contains default values.
Package defaults contains default values.
postgres/tools/fs
Package fs provides tools for working with the filesystem.
Package fs provides tools for working with the filesystem.
postgres/tools/health
Package health provides tools to set up container health check options.
Package health provides tools to set up container health check options.
postgres/tools/pgtool
Package pgtool provides tools to run PostgreSQL-specific commands.
Package pgtool provides tools to run PostgreSQL-specific commands.
Package options provides helpers to process retrieval options.
Package options provides helpers to process retrieval options.

Jump to

Keyboard shortcuts

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