logger

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	component.Base
	Dependencies struct {
		SQL *sql.SQL
	}
}

Logger is responsible for logging backups and snapshots

func (*Logger) Add

func (log *Logger) Add(ctx context.Context, export models.Export) error

AddToExportLog adds the provided export to the log.

func (*Logger) Fetch

func (logger *Logger) Fetch(ctx context.Context, flags component.FetcherFlags, target *status.Distillery) (err error)

Fetch writes the SnapshotLog into the given observation

func (*Logger) For

func (log *Logger) For(ctx context.Context, slug string) (exports []models.Export, err error)

For retrieves (and prunes) the ExportLog. Slug determines if entries for Backups (empty slug) or a specific Instance (non-empty slug) are returned.

func (*Logger) Log

func (log *Logger) Log(ctx context.Context) ([]models.Export, error)

Log retrieves (and prunes) all entries in the snapshot log.

func (*Logger) TableInfo

func (*Logger) TableInfo() component.TableInfo

Jump to

Keyboard shortcuts

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