uploads

package
v0.0.0-...-e951c9a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 17 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 {
	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 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, reg prometheus.Registerer) (TableManager, error)

Jump to

Keyboard shortcuts

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