localdisk

package
v0.0.0-...-4ba1123 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package localdisk registers the "filesystem" blobserver storage type, storing blobs in a forest of sharded directories at the specified root.

Example low-level config:

"/storage/": {
    "handler": "storage-filesystem",
    "handlerArgs": {
       "path": "/var/camlistore/blobs"
     }
},

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(root string) (bool, error)

IsDir reports whether root is a localdisk (file-per-blob) storage directory.

Types

type DiskStorage

type DiskStorage struct {
	blobserver.Storage
	blob.SubFetcher
	// contains filtered or unexported fields
}

DiskStorage implements the blobserver.Storage interface using the local filesystem.

func New

func New(root string) (*DiskStorage, error)

New returns a new local disk storage implementation at the provided root directory, which must already exist.

func (*DiskStorage) ResetStorageGeneration

func (ds *DiskStorage) ResetStorageGeneration() error

ResetStorageGeneration reinitializes the generation by recreating the GENERATION.dat file with a new random string

func (*DiskStorage) StorageGeneration

func (ds *DiskStorage) StorageGeneration() (initTime time.Time, random string, err error)

StorageGeneration returns the generation's initialization time, and the random string.

func (*DiskStorage) String

func (ds *DiskStorage) String() string

Jump to

Keyboard shortcuts

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