uploads

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Uploader       string
	UploadInterval time.Duration
	DBRetainPeriod time.Duration
}

type IndexSet

type IndexSet interface {
	Add(idx index.Index)
	Upload(ctx context.Context) error
	Cleanup(indexRetainPeriod time.Duration) error
	ForEach(callback index.ForEachIndexCallback) error
	Close()
}

func NewIndexSet

func NewIndexSet(tableName, userID string, baseIndexSet storage.IndexSet, logger log.Logger) (IndexSet, error)

type Table

type Table interface {
	Name() string
	AddIndex(userID string, idx index.Index) error
	ForEach(userID string, callback index.ForEachIndexCallback) error
	Upload(ctx context.Context) error
	Cleanup(indexRetainPeriod time.Duration) error
	Stop()
}

func NewTable

func NewTable(name, uploader string, storageClient storage.Client) Table

NewTable create a new table instance.

type TableManager

type TableManager interface {
	Stop()
	AddIndex(tableName, userID string, index index.Index) error
	ForEach(tableName, userID string, callback index.ForEachIndexCallback) error
}

func NewTableManager

func NewTableManager(cfg Config, storageClient storage.Client) (TableManager, error)

Jump to

Keyboard shortcuts

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