server

package
v0.0.0-...-aa29b24 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(svc *Service, config *serverutil.ServerConfig, addr string) error

Serve the specified service over HTTP with the given config.

Types

type Service

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

Service implementation of the tabacco backup metadata server API.

func New

func New(dbDriver, dbURI string, maxMetadataAgeDays int) (*Service, error)

New creates a new service and returns it.

func (*Service) AddDataset

func (s *Service) AddDataset(ctx context.Context, backup tabacco.Backup, ds tabacco.Dataset) error

AddDataset adds metadata about a successful backup of a Dataset, along with its parent Backup object.

func (*Service) Close

func (s *Service) Close()

Close the underlying database and all associated resources.

func (*Service) FindAtoms

func (s *Service) FindAtoms(ctx context.Context, req *tabacco.FindRequest) ([]*tabacco.Backup, error)

FindAtoms searches for atoms meeting a particular criteria and returns them grouped by backup and dataset (the atoms will be contained within the dataset).

Jump to

Keyboard shortcuts

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