Safe Haskell | None |
---|---|
Language | Haskell2010 |
TahoeLAFS.Storage.Backend
Documentation
class Backend b where Source #
Methods
version :: b -> IO Version Source #
renewLease :: b -> StorageIndex -> [LeaseSecret] -> IO () Source #
Update the lease expiration time on the shares associated with the given storage index.
createImmutableStorageIndex :: b -> StorageIndex -> Maybe [LeaseSecret] -> AllocateBuckets -> IO AllocationResult Source #
writeImmutableShare :: b -> StorageIndex -> ShareNumber -> Maybe [LeaseSecret] -> ShareData -> Maybe ByteRanges -> IO () Source #
abortImmutableUpload :: b -> StorageIndex -> ShareNumber -> Maybe [LeaseSecret] -> IO () Source #
adviseCorruptImmutableShare :: b -> StorageIndex -> ShareNumber -> CorruptionDetails -> IO () Source #
getImmutableShareNumbers :: b -> StorageIndex -> IO (CBORSet ShareNumber) Source #
readImmutableShare :: b -> StorageIndex -> ShareNumber -> QueryRange -> IO ShareData Source #
readvAndTestvAndWritev Source #
Arguments
:: b | |
-> StorageIndex | The storage index at which to operate. |
-> WriteEnablerSecret | A shared secret which the backend can use to authorize the writes. |
-> ReadTestWriteVectors | The reads, tests, and writes to perform. |
-> IO ReadTestWriteResult |
Read some ranges of all shares held and/or, if test conditions are met, overwrite some ranges of some shares.
readMutableShare :: b -> StorageIndex -> ShareNumber -> QueryRange -> IO ShareData Source #
getMutableShareNumbers :: b -> StorageIndex -> IO (CBORSet ShareNumber) Source #
adviseCorruptMutableShare :: b -> StorageIndex -> ShareNumber -> CorruptionDetails -> IO () Source #
Instances
data WriteImmutableError Source #
Constructors
MissingUploadSecret | |
ShareSizeMismatch | |
ImmutableShareAlreadyWritten | |
ShareNotAllocated | |
IncorrectUploadSecret | |
IncorrectWriteEnablerSecret |
Instances
writeMutableShare :: Backend b => b -> StorageIndex -> ShareNumber -> WriteEnablerSecret -> ShareData -> Maybe ByteRanges -> IO () Source #
withUploadSecret :: Maybe [LeaseSecret] -> (UploadSecret -> IO a) -> IO a Source #