Documentation ¶
Index ¶
- Constants
- func NewAttrCacheComponent() internal.Component
- type AttrCache
- func (ac *AttrCache) Chmod(options internal.ChmodOptions) error
- func (ac *AttrCache) Chown(options internal.ChownOptions) error
- func (ac *AttrCache) CommitData(options internal.CommitDataOptions) error
- func (ac *AttrCache) Configure(_ bool) error
- func (ac *AttrCache) CopyFromFile(options internal.CopyFromFileOptions) error
- func (ac *AttrCache) CreateDir(options internal.CreateDirOptions) error
- func (ac *AttrCache) CreateFile(options internal.CreateFileOptions) (*handlemap.Handle, error)
- func (ac *AttrCache) CreateLink(options internal.CreateLinkOptions) error
- func (ac *AttrCache) DeleteDir(options internal.DeleteDirOptions) error
- func (ac *AttrCache) DeleteFile(options internal.DeleteFileOptions) error
- func (ac *AttrCache) FlushFile(options internal.FlushFileOptions) error
- func (ac *AttrCache) GenConfig() string
- func (ac *AttrCache) GetAttr(options internal.GetAttrOptions) (*internal.ObjAttr, error)
- func (ac *AttrCache) Name() string
- func (ac *AttrCache) OnConfigChange()
- func (ac *AttrCache) Priority() internal.ComponentPriority
- func (ac *AttrCache) ReadDir(options internal.ReadDirOptions) (pathList []*internal.ObjAttr, err error)
- func (ac *AttrCache) RenameDir(options internal.RenameDirOptions) error
- func (ac *AttrCache) RenameFile(options internal.RenameFileOptions) error
- func (ac *AttrCache) SetName(name string)
- func (ac *AttrCache) SetNextComponent(nc internal.Component)
- func (ac *AttrCache) Start(ctx context.Context) error
- func (ac *AttrCache) Stop() error
- func (ac *AttrCache) StreamDir(options internal.StreamDirOptions) ([]*internal.ObjAttr, string, error)
- func (ac *AttrCache) SyncDir(options internal.SyncDirOptions) error
- func (ac *AttrCache) SyncFile(options internal.SyncFileOptions) error
- func (ac *AttrCache) TruncateFile(options internal.TruncateFileOptions) error
- func (ac *AttrCache) WriteFile(options internal.WriteFileOptions) (int, error)
- type AttrCacheOptions
Constants ¶
const ( AttrFlagUnknown uint16 = iota AttrFlagExists AttrFlagValid )
Flags represented in BitMap for various flags in the attr cache item
Variables ¶
This section is empty.
Functions ¶
func NewAttrCacheComponent ¶
Pipeline will call this method to create your object, initialize your variables here << DO NOT DELETE ANY AUTO GENERATED CODE HERE >>
Types ¶
type AttrCache ¶
type AttrCache struct { internal.BaseComponent // contains filtered or unexported fields }
Common structure for AttrCache Component
func (*AttrCache) Chmod ¶
func (ac *AttrCache) Chmod(options internal.ChmodOptions) error
Chmod : Update the file with its new permissions
func (*AttrCache) Chown ¶
func (ac *AttrCache) Chown(options internal.ChownOptions) error
Chown : Update the file with its new owner and group (when datalake chown is implemented)
func (*AttrCache) CommitData ¶
func (ac *AttrCache) CommitData(options internal.CommitDataOptions) error
func (*AttrCache) Configure ¶
Configure : Pipeline will call this method after constructor so that you can read config and initialize yourself
Return failure if any config is not valid to exit the process
func (*AttrCache) CopyFromFile ¶
func (ac *AttrCache) CopyFromFile(options internal.CopyFromFileOptions) error
CopyFromFile : Mark the file invalid
func (*AttrCache) CreateDir ¶
func (ac *AttrCache) CreateDir(options internal.CreateDirOptions) error
------------------------- Methods implemented by this component ------------------------------------------- CreateDir: Mark the directory invalid
func (*AttrCache) CreateFile ¶
CreateFile: Mark the file invalid
func (*AttrCache) CreateLink ¶
func (ac *AttrCache) CreateLink(options internal.CreateLinkOptions) error
CreateLink : Mark the link and target invalid
func (*AttrCache) DeleteDir ¶
func (ac *AttrCache) DeleteDir(options internal.DeleteDirOptions) error
DeleteDir: Mark the directory deleted and recursively mark all it's children deleted
func (*AttrCache) DeleteFile ¶
func (ac *AttrCache) DeleteFile(options internal.DeleteFileOptions) error
DeleteFile : Mark the file deleted
func (*AttrCache) FlushFile ¶
func (ac *AttrCache) FlushFile(options internal.FlushFileOptions) error
FlushFile : flush file
func (*AttrCache) GetAttr ¶
GetAttr : Try to serve the request from the attribute cache, otherwise cache attributes of the path returned by next component
func (*AttrCache) OnConfigChange ¶
func (ac *AttrCache) OnConfigChange()
OnConfigChange : If component has registered, on config file change this method is called
func (*AttrCache) Priority ¶
func (ac *AttrCache) Priority() internal.ComponentPriority
func (*AttrCache) ReadDir ¶
func (ac *AttrCache) ReadDir(options internal.ReadDirOptions) (pathList []*internal.ObjAttr, err error)
ReadDir : Optionally cache attributes of paths returned by next component
func (*AttrCache) RenameDir ¶
func (ac *AttrCache) RenameDir(options internal.RenameDirOptions) error
RenameDir : Mark the source directory deleted and recursively mark all it's children deleted. Invalidate the destination since we may have overwritten it.
func (*AttrCache) RenameFile ¶
func (ac *AttrCache) RenameFile(options internal.RenameFileOptions) error
RenameFile : Mark the source file deleted. Invalidate the destination file.
func (*AttrCache) SetNextComponent ¶
func (*AttrCache) Start ¶
Start : Pipeline calls this method to start the component functionality
this shall not block the call otherwise pipeline will not start
func (*AttrCache) StreamDir ¶
func (ac *AttrCache) StreamDir(options internal.StreamDirOptions) ([]*internal.ObjAttr, string, error)
StreamDir : Optionally cache attributes of paths returned by next component
func (*AttrCache) TruncateFile ¶
func (ac *AttrCache) TruncateFile(options internal.TruncateFileOptions) error
TruncateFile : Update the file with its truncated size
type AttrCacheOptions ¶
type AttrCacheOptions struct { Timeout uint32 `config:"timeout-sec" yaml:"timeout-sec,omitempty"` NoCacheOnList bool `config:"no-cache-on-list" yaml:"no-cache-on-list,omitempty"` NoSymlinks bool `config:"no-symlinks" yaml:"no-symlinks,omitempty"` //maximum file attributes overall to be cached MaxFiles int `config:"max-files" yaml:"max-files,omitempty"` // support v1 CacheOnList bool `config:"cache-on-list"` }
Structure defining your config parameters