Documentation
¶
Overview ¶
Package objectstore provides a factory function to create ObjectStore instances.
Index ¶
Constants ¶
View Source
const (
DefaultDriver = "local" // Define a default driver
)
View Source
const Module = "storage.objectstore"
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg *ossv1.ObjectStoreConfig, option ...options.Option) (storageiface.ObjectStore, error)
New creates a new ObjectStore instance based on the provided configuration. It uses the internal factory registry to find the appropriate provider. To use a specific provider (e.g., "minio"), ensure its package is imported for its side effects (e.g., `import _ "path/to/minio/provider"`), which will register the provider's factory.
Types ¶
type Factory ¶
type Factory interface {
New(cfg *ossv1.ObjectStoreConfig) (storageiface.ObjectStore, error) // Changed cfg type
}
Factory is the interface for creating new ObjectStore components.
Click to show internal directories.
Click to hide internal directories.