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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider manages the lifecycle of object store instances. It uses lazy-loading with sync.Once to ensure instances are created only when needed and in a concurrency-safe manner.

func NewProvider

func NewProvider(logger runtimelog.Logger) *Provider

NewProvider creates a new, uninitialized Provider instance.

func (*Provider) DefaultObjectStore

func (p *Provider) DefaultObjectStore(globalDefaultName string) (storageiface.ObjectStore, error)

DefaultObjectStore returns the default object store instance.

func (*Provider) Initialize

func (p *Provider) Initialize(cfg *datav1.ObjectStores, opts ...options.Option)

Initialize configures the provider with the necessary configuration and options.

func (*Provider) ObjectStore

func (p *Provider) ObjectStore(name string) (storageiface.ObjectStore, error)

ObjectStore returns a single object store instance by name.

func (*Provider) ObjectStores

func (p *Provider) ObjectStores() (map[string]storageiface.ObjectStore, error)

ObjectStores returns a map of all available object store instances. On the first call, it lazily creates and caches instances based on the configuration.

func (*Provider) RegisterObjectStore

func (p *Provider) RegisterObjectStore(name string, store storageiface.ObjectStore)

RegisterObjectStore allows for manual registration of an object store instance.

Jump to

Keyboard shortcuts

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