Documentation
¶
Index ¶
- type Provider
- func (p *Provider) DefaultObjectStore(globalDefaultName string) (storageiface.ObjectStore, error)
- func (p *Provider) Initialize(cfg *datav1.ObjectStores, opts ...options.Option)
- func (p *Provider) ObjectStore(name string) (storageiface.ObjectStore, error)
- func (p *Provider) ObjectStores() (map[string]storageiface.ObjectStore, error)
- func (p *Provider) RegisterObjectStore(name string, store storageiface.ObjectStore)
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.