Documentation ¶
Index ¶
- Constants
- type Configuration
- type Entry
- type File
- type Filesystem
- type FilesystemSync
- type NodeType
- type ReadOnlyFile
- type Reference
- func (r *Reference) LookupDir(name string) (*Reference, error)
- func (r *Reference) LookupFile(name string) (*File, error)
- func (r *Reference) LookupSymLink(name string) (string, error)
- func (r *Reference) MoveTo(target *Reference, sourcename string, targetname string) error
- func (r *Reference) NewDir(name string) error
- func (r *Reference) NewFile(name string) error
- func (r *Reference) NewSymLink(name string, target string) error
- func (r *Reference) Release()
- func (r *Reference) Remove(name string, rmdir bool) error
- func (r *Reference) Rename(sourcename string, targetname string) error
- func (r *Reference) Stat(name string) (NodeType, error)
- type Traverser
- type Unlocker
- type WritableFile
Constants ¶
View Source
const EntryCount = apis.MaxChunkSize / EntrySize
View Source
const EntrySize = 32
View Source
const MaxName = EntrySize - 8 - 1
View Source
const MaxSymLinkSize = 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { MountPoint string ClientConfig client.Configuration SyncServerAddresses []apis.ServerAddress }
type Entry ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
type Filesystem ¶
type Filesystem interface { Mkdir(path string) error Rename(source string, dest string) error Unlink(path string) error Rmdir(path string) error OpenRead(path string) (ReadOnlyFile, error) // Note: this does *NOT* truncate by default! OpenWrite(path string, create bool, exclusive bool) (WritableFile, error) SymLink(source string, dest string) error Stat(path string) (os.FileInfo, error) ReadLink(path string) (string, error) Truncate(path string, length uint32) error ListDir(path string) ([]string, error) GetTraverser() (*Traverser, error) }
func NewFilesystem ¶
func NewFilesystem(client apis.Client, sync apis.SyncServer) Filesystem
func NewFilesystemClient ¶
func NewFilesystemClient(config Configuration) (Filesystem, error)
type FilesystemSync ¶
type FilesystemSync struct {
// contains filtered or unexported fields
}
func (*FilesystemSync) GetRoot ¶
func (f *FilesystemSync) GetRoot() (apis.ChunkNum, error)
note: the root chunk never changes
func (*FilesystemSync) ReadLockChunk ¶
func (f *FilesystemSync) ReadLockChunk(chunk apis.ChunkNum) (Unlocker, error)
func (*FilesystemSync) WriteLockChunk ¶
func (f *FilesystemSync) WriteLockChunk(chunk apis.ChunkNum) (Unlocker, error)
type Reference ¶
type Reference struct {
// contains filtered or unexported fields
}
type Unlocker ¶
type Unlocker struct {
// contains filtered or unexported fields
}
func (*Unlocker) EnsureWrite ¶
type WritableFile ¶
type WritableFile interface { io.Reader io.ReaderAt io.Writer io.WriterAt io.Seeker io.Closer Truncate(uint64) error }
func WithErroringWrite ¶
func WithErroringWrite(i ReadOnlyFile) WritableFile
Click to show internal directories.
Click to hide internal directories.