Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoStorageForWorkspaceError = fmt.Errorf("no storage settings found for workspace")
Functions ¶
This section is empty.
Types ¶
type MultiFileWriter ¶
type MultiFileWriter interface { // Write writes the given data to the file at the given path. Write(path string, data []byte) (int, error) // Close closes all open files. Close() error // Count returns the number of open files. Count() int }
MultiFileWriter can write to multiple paths at the same time.
func NewGzMultiFileWriter ¶
func NewGzMultiFileWriter() MultiFileWriter
NewGzMultiFileWriter creates a new MultiFileWriter that writes to multiple gz-compressed files.
type Provider ¶
type Provider interface { // Gets a file manager for the given workspace. GetFileManager(workspaceID string) (filemanager.FileManager, error) // Gets the storage preferences for the given workspace. GetStoragePreferences(workspaceID string) (backendconfig.StoragePreferences, error) }
Provider is an interface that provides file managers and storage preferences for a given workspace.
func NewDefaultProvider ¶
func NewDefaultProvider() Provider
NewDefaultProvider creates a new provider that operates against the default storage settings populated from the env. Useful for tests that populate settings from env.
func NewProvider ¶
func NewProvider(ctx context.Context, config backendconfig.BackendConfig) Provider
NewProvider creates a new provider that updates its storage settings while backend configuration gets updated.
func NewStaticProvider ¶
func NewStaticProvider(storageSettings map[string]StorageSettings) Provider
NewStaticProvider creates a new provider that operates against a predefined storage settings. Useful for tests.
type StorageSettings ¶
type StorageSettings struct { Bucket backendconfig.StorageBucket Preferences backendconfig.StoragePreferences }
Click to show internal directories.
Click to hide internal directories.