Documentation ¶
Index ¶
- func DeleteContainer(ctx context.Context, c *swift.Connection, container string) error
- func MakeObjectName(docID string) string
- func MakeObjectNameV3(docID, internalID string) string
- func New(db prefixer.Prefixer, index vfs.Indexer, disk vfs.DiskThresholder, ...) (vfs.VFS, error)
- func NewInternalID() string
- func NewThumbsFs(c *swift.Connection, domain string) vfs.Thumbser
- func NewThumbsFsV2(c *swift.Connection, db prefixer.Prefixer) vfs.Thumbser
- func NewThumbsFsV3(c *swift.Connection, db prefixer.Prefixer) vfs.Thumbser
- func NewV2(db prefixer.Prefixer, index vfs.Indexer, disk vfs.DiskThresholder, ...) (vfs.VFS, error)
- func NewV3(db prefixer.Prefixer, index vfs.Indexer, disk vfs.DiskThresholder, ...) (vfs.VFS, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteContainer ¶
DeleteContainer removes all the files inside the given container, and then deletes it.
func MakeObjectName ¶
MakeObjectName build the swift object name for a given file document. It creates a virtual subfolder by splitting the document ID, which should be 32 bytes long, on the 27nth byte. This avoid having a flat hierarchy in swift with no bound
func MakeObjectNameV3 ¶
MakeObjectNameV3 builds the swift object name for a given file document. It creates a virtual subfolder by splitting the document ID, which should be 32 bytes long, on the 27nth byte. This avoid having a flat hierarchy in swift with no bound. And it appends the internalID at the end to regroup all the versions of a file in the same virtual subfolder.
func New ¶
func New(db prefixer.Prefixer, index vfs.Indexer, disk vfs.DiskThresholder, mu lock.ErrorRWLocker) (vfs.VFS, error)
New returns a vfs.VFS instance associated with the specified indexer and the swift storage url.
func NewInternalID ¶
func NewInternalID() string
NewInternalID returns a random string that can be used as an internal_vfs_id.
func NewThumbsFs ¶
NewThumbsFs creates a new thumb filesystem base on swift.
func NewThumbsFsV2 ¶
NewThumbsFsV2 creates a new thumb filesystem base on swift.
This version stores the thumbnails in the same container as the main data container.
func NewThumbsFsV3 ¶
NewThumbsFsV3 creates a new thumb filesystem base on swift.
This version stores the thumbnails in the same container as the main data container.
func NewV2 ¶
func NewV2(db prefixer.Prefixer, index vfs.Indexer, disk vfs.DiskThresholder, mu lock.ErrorRWLocker) (vfs.VFS, error)
NewV2 returns a vfs.VFS instance associated with the specified indexer and the swift storage url.
This version implements a simpler layout where swift does not contain any hierarchy: meaning no index informations. This help with index incoherency and as many performance improvements regarding moving / renaming folders.
func NewV3 ¶
func NewV3(db prefixer.Prefixer, index vfs.Indexer, disk vfs.DiskThresholder, mu lock.ErrorRWLocker) (vfs.VFS, error)
NewV3 returns a vfs.VFS instance associated with the specified indexer and the swift storage url.
This new V3 version uses only a single swift container per instance. We can easily put the thumbnails in the same container that the data. And, for the versioning, Swift Object Versioning is not what we want: it is not as robust as we expected (we had encoding issue with the V1 layout for file with `? ` in the name), and it is poor in features (for example, we want to swap an old version with the current version without having to download/upload contents, and it is not supported).
Types ¶
This section is empty.