Documentation
¶
Index ¶
- Variables
- func DownloadFileFromStorage(destination string, decompressFile bool, sync bool, logger log.Logger, ...) error
- func IsCompressedFile(filename string) bool
- func LoggerWithFilename(logger log.Logger, filename string) log.Logger
- type Client
- type CommonIndexClient
- type GetFileFunc
- type IndexFile
- type IndexSet
- type UserIndexClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserIDMustNotBeEmpty = errors.New("userID must not be empty") ErrUserIDMustBeEmpty = errors.New("userID must be empty") )
Functions ¶
func DownloadFileFromStorage ¶
func DownloadFileFromStorage(destination string, decompressFile bool, sync bool, logger log.Logger, getFileFunc GetFileFunc) error
DownloadFileFromStorage downloads a file from storage to given location.
func IsCompressedFile ¶
Types ¶
type Client ¶
type Client interface { CommonIndexClient UserIndexClient RefreshIndexTableNamesCache(ctx context.Context) ListTables(ctx context.Context) ([]string, error) RefreshIndexTableCache(ctx context.Context, tableName string) IsFileNotFoundErr(err error) bool Stop() }
Client is used to manage boltdb index files in object storage, when using boltdb-shipper.
func NewIndexStorageClient ¶
func NewIndexStorageClient(origObjectClient client.ObjectClient, storagePrefix string) Client
type CommonIndexClient ¶
type CommonIndexClient interface { ListFiles(ctx context.Context, tableName string, bypassCache bool) ([]IndexFile, []string, error) GetFile(ctx context.Context, tableName, fileName string) (io.ReadCloser, error) PutFile(ctx context.Context, tableName, fileName string, file io.ReadSeeker) error DeleteFile(ctx context.Context, tableName, fileName string) error }
CommonIndexClient allows doing operations on the object store for common index.
type GetFileFunc ¶
type GetFileFunc func() (io.ReadCloser, error)
type IndexSet ¶
type IndexSet interface { RefreshIndexTableCache(ctx context.Context, tableName string) ListFiles(ctx context.Context, tableName, userID string, bypassCache bool) ([]IndexFile, error) GetFile(ctx context.Context, tableName, userID, fileName string) (io.ReadCloser, error) PutFile(ctx context.Context, tableName, userID, fileName string, file io.ReadSeeker) error DeleteFile(ctx context.Context, tableName, userID, fileName string) error IsFileNotFoundErr(err error) bool IsUserBasedIndexSet() bool }
IndexSet provides storage operations for user or common index tables.
func NewIndexSet ¶
NewIndexSet handles storage operations based on the value of indexSet.userBasedIndex
type UserIndexClient ¶
type UserIndexClient interface { ListUserFiles(ctx context.Context, tableName, userID string, bypassCache bool) ([]IndexFile, error) GetUserFile(ctx context.Context, tableName, userID, fileName string) (io.ReadCloser, error) PutUserFile(ctx context.Context, tableName, userID, fileName string, file io.ReadSeeker) error DeleteUserFile(ctx context.Context, tableName, userID, fileName string) error }
UserIndexClient allows doing operations on the object store for user specific index.
Click to show internal directories.
Click to hide internal directories.