objectstore

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 5 Imported by: 0

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

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.

func Register

func Register(name string, factory Factory)

Register registers a new object store factory with the default factory registry.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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