Documentation ¶
Index ¶
- type Cache
- func (c *Cache) AddHandle(handle Handle) (HandleInfo, error)
- func (c *Cache) AddNode(parent fine.Node, name string, node Node) (info NodeInfo, err error)
- func (c *Cache) GetHandle(id fine.Handle) (HandleInfo, Handle, error)
- func (c *Cache) GetNode(id fine.Node) (NodeInfo, Node, error)
- func (c *Cache) NodePath(id fine.Node) (string, error)
- func (c *Cache) ReleaseHandle(id fine.Handle) error
- func (c *Cache) ReleaseNode(id fine.Node, refs uint64) error
- func (c *Cache) RenameNode(parent fine.Node, req *fine.RenameRequest) error
- type Handle
- type HandleInfo
- type Key
- type Node
- type NodeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache implements a cache of nodes and handles that a Handler can use.
func (*Cache) AddHandle ¶
func (c *Cache) AddHandle(handle Handle) (HandleInfo, error)
AddHandle stores a new handle.
func (*Cache) AddNode ¶
AddNode stores a new node. If the named node already exists, the node argument will be ignored and the reference count to the existing node will increase.
func (*Cache) ReleaseHandle ¶
ReleaseHandle releases an existing handle.
func (*Cache) ReleaseNode ¶
ReleaseNode releases a node. refs are subtracted from the total reference count, and the node will be fully removed once refs decreases to 0.
func (*Cache) RenameNode ¶
RenameNode renames a cached file. Returns ErrorNotExist if the source file isn't currently cached.
type Handle ¶
type Handle interface { // Close is called when the Handle is fully removed from the cache. Close() error }
type HandleInfo ¶
Click to show internal directories.
Click to hide internal directories.