consumer

package
v0.0.0-...-980bd36 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package consumer implements the WAL consumer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

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

Backup represents a Backup consumer.

func NewBackup

func NewBackup(opts *BackupOptions) (*Backup, error)

NewBackup creates a new Backup consumer.

func (*Backup) Run

func (d *Backup) Run(ctx context.Context) error

Run starts the consumer until the context is canceled or the SIGINT signal arrives.

type BackupOptions

type BackupOptions struct {
	// The queue to be used
	Queue *queue.Conn

	// A config file to connect to tier 1
	Tier1KopiaConfig string

	// A config file to connect to tier 2
	Tier2KopiaConfig string

	// Tier1WALRepository is where the retention policy is stored (see
	// walserver.GetClusterRetentionPolicy): the relay only copies the
	// backups that tier 2 retention keeps. Only needed with tier 2.
	Tier1WALRepository *repository.Connection

	// Tier2ServerAddress is the address of the tier 2 Kopia server.
	Tier2ServerAddress string

	// ServerTLSCertFile is the PEM file with the serving certificate shared
	// by the tier 1 and tier 2 Kopia servers.
	ServerTLSCertFile string

	// RunID is the unique identifier for this server run.
	RunID string

	// RunSecret is the secret credential for server control operations.
	RunSecret string

	// The cache directory
	CacheDirectory string
}

BackupOptions are the configuration of the WAL consumer.

type WAL

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

WAL represents a WAL consumer.

func NewWAL

func NewWAL(opts *WALOptions) *WAL

NewWAL creates a new WAL consumer.

func (*WAL) Run

func (d *WAL) Run(ctx context.Context) error

Run starts the consumer until the context is canceled or the SIGINT signal arrives.

type WALOptions

type WALOptions struct {
	// The queue to be used
	Queue *queue.Conn

	// A connection to tier 1
	Tier1 *repository.Connection

	// A connection to tier 2
	Tier2 *repository.Connection
}

WALOptions are the configuration of the WAL consumer.

Jump to

Keyboard shortcuts

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