Documentation
¶
Index ¶
Constants ¶
const StorageModeEnv = "BLDR_BROWSER_STORAGE"
StorageModeEnv selects the browser storage backend after the browser probes its actual capabilities.
Variables ¶
This section is empty.
Functions ¶
func BuildStorage ¶
BuildStorage builds all available storage methods.
prefix is used as the IndexedDB prefix in the browser.
Types ¶
type IndexedDB ¶
type IndexedDB struct {
// contains filtered or unexported fields
}
IndexedDB implements the indexeddb-backed storage.
func (*IndexedDB) AddFactories ¶
AddFactories adds the factories to the resolver.
func (*IndexedDB) BuildVolumeConfig ¶
func (i *IndexedDB) BuildVolumeConfig(id string, baseVolCtrlConf *volume_controller.Config) (config.Config, error)
BuildVolumeConfig creates the volume config for the store ID. Returns nil if the storage cannot produce Volume.
func (*IndexedDB) DeleteVolume ¶
DeleteVolume removes the IndexedDB database for the given volume ID.
func (*IndexedDB) GetStorageInfo ¶
func (i *IndexedDB) GetStorageInfo() *storage.StorageInfo
GetStorageInfo returns StorageInfo.
type OpfsStorage ¶
type OpfsStorage struct {
// contains filtered or unexported fields
}
OpfsStorage implements OPFS-backed browser storage.
func NewOpfsStorage ¶
func NewOpfsStorage(prefix string) *OpfsStorage
NewOpfsStorage constructs an OPFS storage handle.
func (*OpfsStorage) AddFactories ¶
func (s *OpfsStorage) AddFactories(b bus.Bus, sr *static.Resolver)
AddFactories adds the factories to the resolver.
func (*OpfsStorage) BuildVolumeConfig ¶
func (s *OpfsStorage) BuildVolumeConfig(id string, baseVolCtrlConf *volume_controller.Config) (config.Config, error)
BuildVolumeConfig creates the volume config for the store ID.
func (*OpfsStorage) DeleteVolume ¶
func (s *OpfsStorage) DeleteVolume(id string) error
DeleteVolume removes the active OPFS volume while retaining replaced legacy data.
func (*OpfsStorage) GetStorageInfo ¶
func (s *OpfsStorage) GetStorageInfo() *storage.StorageInfo
GetStorageInfo returns StorageInfo.