Documentation
¶
Index ¶
- Constants
- Variables
- func NormalizeFileSystemPath(path string) string
- type BlobClient
- type BlobObject
- type BlobProperties
- type BlobStore
- func CreateBlobStoreForURI(uri string, opts ...BlobStoreOption) (BlobStore, error)
- func NewFSBlobStore(prefix string, enableLocking bool) (BlobStore, error)
- func NewGCSBlobStore(u *url.URL, disableLocking bool) (BlobStore, error)
- func NewMemBlobStore(prefix string, supportsLocking bool) (BlobStore, error)
- func NewS3BlobStore(u *url.URL, opts ...BlobStoreOption) (BlobStore, error)
- type BlobStoreOption
- type Lock
- type S3Options
Constants ¶
View Source
const NetworkPrefix = "\\"
View Source
const UNCPrefix = "\\\\?\\"
Variables ¶
View Source
var ErrLocked error = trylockError("fslock is already locked")
ErrLocked indicates TryLock failed because the lock was already locked.
View Source
var ErrTimeout error = timeoutError("lock timeout exceeded")
ErrTimeout indicates that the lock attempt timed out.
Functions ¶
func NormalizeFileSystemPath ¶
Types ¶
type BlobClient ¶
type BlobClient interface {
NewObject(path string) (BlobObject, error)
GetObjects(pathPrefix string) ([]BlobProperties, error)
SupportsLocking() bool
String() string
Close()
}
BlobClient
type BlobObject ¶
type BlobObject interface {
// returns false, nil if the object does not exist
// returns false, err on error
// returns true, nil if the object exists
Exists() (bool, error)
// Locked the version for Write and Delete operations
// If the underlying file has changed between the LockWriteVersion call
// and a Write or Delete operation the operation will fail
LockWriteVersion() (bool, error)
// returns nil, error on error
// returns []byte, nil on success
// returns nil, nil if the underlying file no longer exists
Read() ([]byte, error)
// If no write condition is set:
// returns true, nil on success
// returns false, err on failure
// If a write condition is set:
// returns true, nil if a version locked write succeeded
// returns false, nil if the write was prevented due to a version change
// returns false, err on error
Write(data []byte) (bool, error)
// Will return an error if a version lock is set with LockWriteVersion()
// and the underlying file has changed
Delete() error
String() string
}
BlobObject
type BlobProperties ¶
type BlobStore ¶
type BlobStore interface {
NewClient(ctx context.Context) (BlobClient, error)
String() string
}
BlobStore
func CreateBlobStoreForURI ¶
func CreateBlobStoreForURI(uri string, opts ...BlobStoreOption) (BlobStore, error)
func NewFSBlobStore ¶
NewFSBlobStore ...
func NewGCSBlobStore ¶
NewGCSBlobStore ...
func NewMemBlobStore ¶
NewMemBlobStore ...
func NewS3BlobStore ¶
func NewS3BlobStore(u *url.URL, opts ...BlobStoreOption) (BlobStore, error)
NewS3BlobStore ...
type BlobStoreOption ¶
type BlobStoreOption func(options interface{})
Click to show internal directories.
Click to hide internal directories.