Documentation ¶
Index ¶
- type Blobstore
- type EventAction
- type GpfsFileAuditLoggingWatcher
- type GpfsWatchFolderWatcher
- type InotifyWatcher
- type PermissionCheckFunc
- type ScanDebouncer
- type Tree
- func (t *Tree) BuildSpaceIDIndexEntry(spaceID, nodeID string) string
- func (t *Tree) CreateDir(ctx context.Context, n *node.Node) (err error)
- func (t *Tree) Delete(ctx context.Context, n *node.Node) error
- func (t *Tree) DeleteBlob(node *node.Node) error
- func (t *Tree) GetMD(ctx context.Context, n *node.Node) (os.FileInfo, error)
- func (t *Tree) HandleFileDelete(path string) error
- func (t *Tree) InitNewNode(ctx context.Context, n *node.Node, fsize uint64) (metadata.UnlockFunc, error)
- func (t *Tree) ListFolder(ctx context.Context, n *node.Node) ([]*node.Node, error)
- func (t *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node) (err error)
- func (t *Tree) Propagate(ctx context.Context, n *node.Node, sizeDiff int64) (err error)
- func (t *Tree) PublishEvent(ev interface{})
- func (t *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid, key string, path string) (*node.Node, func() error, error)
- func (t *Tree) ReadBlob(node *node.Node) (io.ReadCloser, error)
- func (t *Tree) ResolveSpaceIDIndexEntry(spaceid, entry string) (string, string, error)
- func (t *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid, key, trashPath string, targetNode *node.Node) (*node.Node, *node.Node, func() error, error)
- func (t *Tree) Scan(path string, action EventAction, isDir bool) error
- func (t *Tree) Setup() error
- func (t *Tree) TouchFile(ctx context.Context, n *node.Node, markprocessing bool, mtime string) error
- func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error
- func (t *Tree) WriteBlob(node *node.Node, source string) error
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blobstore ¶
type Blobstore interface { Upload(node *node.Node, source string) error Download(node *node.Node) (io.ReadCloser, error) Delete(node *node.Node) error }
Blobstore defines an interface for storing blobs in a blobstore
type EventAction ¶ added in v2.22.0
type EventAction int
const ( ActionCreate EventAction = iota ActionUpdate ActionMove ActionDelete ActionMoveFrom )
type GpfsFileAuditLoggingWatcher ¶ added in v2.20.0
type GpfsFileAuditLoggingWatcher struct {
// contains filtered or unexported fields
}
func NewGpfsFileAuditLoggingWatcher ¶ added in v2.20.0
func (*GpfsFileAuditLoggingWatcher) Watch ¶ added in v2.20.0
func (w *GpfsFileAuditLoggingWatcher) Watch(path string)
type GpfsWatchFolderWatcher ¶ added in v2.20.0
type GpfsWatchFolderWatcher struct {
// contains filtered or unexported fields
}
func NewGpfsWatchFolderWatcher ¶ added in v2.20.0
func (*GpfsWatchFolderWatcher) Watch ¶ added in v2.20.0
func (w *GpfsWatchFolderWatcher) Watch(topic string)
type InotifyWatcher ¶ added in v2.20.0
type InotifyWatcher struct {
// contains filtered or unexported fields
}
func NewInotifyWatcher ¶ added in v2.20.0
func NewInotifyWatcher(tree *Tree, log *zerolog.Logger) *InotifyWatcher
func (*InotifyWatcher) Watch ¶ added in v2.20.0
func (iw *InotifyWatcher) Watch(path string)
type PermissionCheckFunc ¶
type PermissionCheckFunc func(rp *provider.ResourcePermissions) bool
PermissionCheckFunc defined a function used to check resource permissions
type ScanDebouncer ¶ added in v2.20.0
type ScanDebouncer struct {
// contains filtered or unexported fields
}
func NewScanDebouncer ¶ added in v2.20.0
func NewScanDebouncer(d time.Duration, f func(item scanItem)) *ScanDebouncer
NewScanDebouncer returns a new SpaceDebouncer instance
func (*ScanDebouncer) Debounce ¶ added in v2.20.0
func (d *ScanDebouncer) Debounce(item scanItem)
Debounce restarts the debounce timer for the given space
func (*ScanDebouncer) InProgress ¶ added in v2.22.0
func (d *ScanDebouncer) InProgress(path string) bool
InProgress returns true if the given path is currently being processed
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree manages a hierarchical tree
func New ¶
func New(lu node.PathLookup, bs Blobstore, um usermapper.Mapper, trashbin *trashbin.Trashbin, o *options.Options, es events.Stream, cache store.Store, log *zerolog.Logger) (*Tree, error)
New returns a new instance of Tree
func (*Tree) BuildSpaceIDIndexEntry ¶ added in v2.20.0
BuildSpaceIDIndexEntry returns the entry for the space id index
func (*Tree) DeleteBlob ¶
DeleteBlob deletes a blob from the blobstore
func (*Tree) HandleFileDelete ¶ added in v2.21.0
func (*Tree) InitNewNode ¶ added in v2.20.0
func (t *Tree) InitNewNode(ctx context.Context, n *node.Node, fsize uint64) (metadata.UnlockFunc, error)
InitNewNode initializes a new node
func (*Tree) ListFolder ¶
ListFolder lists the content of a folder node
func (*Tree) PublishEvent ¶ added in v2.21.0
func (t *Tree) PublishEvent(ev interface{})
func (*Tree) PurgeRecycleItemFunc ¶
func (t *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid, key string, path string) (*node.Node, func() error, error)
PurgeRecycleItemFunc returns a node and a function to purge it from the trash
func (*Tree) ResolveSpaceIDIndexEntry ¶ added in v2.20.0
ResolveSpaceIDIndexEntry returns the node id for the space id index entry
func (*Tree) RestoreRecycleItemFunc ¶
func (t *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid, key, trashPath string, targetNode *node.Node) (*node.Node, *node.Node, func() error, error)
RestoreRecycleItemFunc returns a node and a function to restore it from the trash.
func (*Tree) Scan ¶ added in v2.20.0
func (t *Tree) Scan(path string, action EventAction, isDir bool) error
Scan scans the given path and updates the id chache
func (*Tree) TouchFile ¶
func (t *Tree) TouchFile(ctx context.Context, n *node.Node, markprocessing bool, mtime string) error
TouchFile creates a new empty file
func (*Tree) WarmupIDCache ¶ added in v2.20.0
WarmupIDCache warms up the id cache