Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { DataDir string `yaml:"data-dir"` // Directory where the WAL and pin file should be kept. Default: .utahfs StorageProvider *StorageProvider `yaml:"storage-provider"` MaxWALSize int `yaml:"max-wal-size"` // Max number of blocks to put in WAL before blocking on remote storage. Default: 128*1024 blocks WALParallelism int `yaml:"wal-parallelism"` // Number of threads to use when draining the WAL. Default: 1 DiskCacheSize int64 `yaml:"disk-cache-size"` // Size of on-disk LRU cache. Default: 320*1024 blocks, -1 to disable. DiskCacheLoc string `yaml:"disk-cache-loc"` // Special location for on-disk LRU cache. Default is to store cache inside data-dir. MemCacheSize int `yaml:"mem-cache-size"` // Size of in-memory LRU cache. Default: 32*1024 blocks, -1 to disable. KeepMetadata bool `yaml:"keep-metadata"` // Keep a local copy of metadata, always. Default: false. RemoteServer *RemoteServer `yaml:"remote-server"` Password string `yaml:"password"` // Password for encryption and integrity. User will be prompted if not provided. NumPtrs int64 `yaml:"num-ptrs"` // Number of pointers in a file's skiplist. Default: 12 DataSize int64 `yaml:"data-size"` // Amount of data kept in each of a file's blocks. Default: 32 KiB Archive bool `yaml:"archive"` // Whether or not to enforce archive mode. ORAM bool `yaml:"oram"` // Whether or not to use ORAM. }
func ClientFromFile ¶
type ORAMConfig ¶
type ORAMConfig struct { Key string `yaml:"key"` // Fixed key for encrypting ORAM blocks before being sent to the remote storage provider. NumPtrs int64 `yaml:"num-ptrs"` // Should be the same as num-ptrs in the client-side config. DataSize int64 `yaml:"data-size"` // Should be the same as data-size in the client-side config. }
type RemoteServer ¶
type Server ¶
type Server struct { DataDir string `yaml:"data-dir"` // Directory where the WAL and cache should be kept. Default: utahfs-data StorageProvider *StorageProvider `yaml:"storage-provider"` MaxWALSize int `yaml:"max-wal-size"` // Max number of blocks to put in WAL before blocking on remote storage. Default: 320*1024 blocks WALParallelism int `yaml:"wal-parallelism"` // Number of threads to use when draining the WAL. Default: 1 DiskCacheSize int64 `yaml:"disk-cache-size"` // Size of on-disk LRU cache. Default: 3200*1024 blocks, -1 to disable. DiskCacheLoc string `yaml:"disk-cache-loc"` // Special location for on-disk LRU cache. Default is to store cache inside data-dir. MemCacheSize int `yaml:"mem-cache-size"` // Size of in-memory LRU cache. Default: 32*1024 blocks, -1 to disable. KeepMetadata bool `yaml:"keep-metadata"` // Keep a local copy of metadata, always. Default: false. ORAM *ORAMConfig `yaml:"oram"` // Provided if ORAM should be used on the server-side. TransportKey string `yaml:"transport-key"` // Pre-shared key for authenticating client and server. }
func ServerFromFile ¶
type StorageProvider ¶
type StorageProvider struct { // Backblaze B2 B2AcctId string `yaml:"b2-acct-id"` B2KeyId string `yaml:"b2-key-id"` B2AppKey string `yaml:"b2-app-key"` B2Bucket string `yaml:"b2-bucket"` B2Url string `yaml:"b2-url"` // AWS S3 and compatible APIs S3AppId string `yaml:"s3-app-id"` S3AppKey string `yaml:"s3-app-key"` S3Bucket string `yaml:"s3-bucket"` S3Url string `yaml:"s3-url"` S3Region string `yaml:"s3-region"` // Google Cloud Storage GCSBucketName string `yaml:"gcs-bucket-name"` GCSCredentialsPath string `yaml:"gcs-credentials-path"` // Local disk storage DiskPath string `yaml:"disk-path"` Retry int `yaml:"retry"` // Max number of times to retry reqs that fail. Prefix string `yaml:"prefix"` // Prefix to put on every key, like `folder-name/`. }
func (*StorageProvider) Store ¶
func (sp *StorageProvider) Store() (persistent.ObjectStorage, error)
Click to show internal directories.
Click to hide internal directories.