Documentation ¶
Overview ¶
Package anchorfs exposes the programming interface for accessing the anchor file system
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrName = errors.NewError("anchor name") ErrNotFound = errors.NewError("not found") )
Functions ¶
func Bind ¶
func Bind(v System)
Bind is used internally to bind an implementation of this package to the public methods of this package
Types ¶
type Dir ¶
type Dir interface { // Path returns the fully-qualified name of the directory Path() string // List returns the list of file and directory names within this directory alongside with the respective revision. List() (rev Rev, files, dirs []string) // Change blocks until the contents of this directory changes relative to its contents at revision sinceRev. // It then returns the new revision number and contents. Change(sinceRev Rev) (rev Rev, files, dirs []string) // ChangeExpire is similar to Change, except it timeouts if a change does not occur within an expire interval. ChangeExpire(sinceRev Rev, expire time.Duration) (rev Rev, files, dir []string, err error) // OpenFile opens the file, registered by the given worker ID, if it exists OpenFile(string) (File, error) // OpenDir opens a subdirectory OpenDir(string) (Dir, error) }
Dir is the interface for a directory of workers in the anchor file system
type File ¶
type File interface { // Path returns the fully-qualified name of the file Path() string // Anchor returns the worker address of the worker who created this file Anchor() n.Addr }
File is the interface of an anchor file system file
Click to show internal directories.
Click to hide internal directories.