internal

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package internal is a generated GoMock package.

Index

Constants

View Source
const (
	PropFlagUnknown uint16 = iota
	PropFlagNotExists
	PropFlagIsDir
	PropFlagEmptyDir
	PropFlagSymlink
	PropFlagMetadataRetrieved
	PropFlagModeDefault // TODO: Does this sound better as ModeDefault or DefaultMode? The getter would be IsModeDefault or IsDefaultMode
)

Flags represented in common.BitMap16 for various properties of the object

Variables

View Source
var EComponentPriority = ComponentPriority(0).LevelMid()

Functions

func AddComponent

func AddComponent(name string, init NewComponent)

AddComponent : Each component calls this method in their init to register the constructor

func ExtendDirName

func ExtendDirName(name string) string

func NewDirBitMap

func NewDirBitMap() common.BitMap16

func NewFileBitMap

func NewFileBitMap() common.BitMap16

func NewSymlinkBitMap

func NewSymlinkBitMap() common.BitMap16

func TruncateDirName

func TruncateDirName(name string) string

Types

type BaseComponent

type BaseComponent struct {
	// contains filtered or unexported fields
}

BaseComponent : Base implementation of the component interface

func (*BaseComponent) Chmod

func (base *BaseComponent) Chmod(options ChmodOptions) error

func (*BaseComponent) Chown

func (base *BaseComponent) Chown(options ChownOptions) error

func (*BaseComponent) CloseDir

func (base *BaseComponent) CloseDir(options CloseDirOptions) error

func (*BaseComponent) CloseFile

func (base *BaseComponent) CloseFile(options CloseFileOptions) error

func (*BaseComponent) Configure

func (base *BaseComponent) Configure(isParent bool) error

func (*BaseComponent) CopyFromFile

func (base *BaseComponent) CopyFromFile(options CopyFromFileOptions) error

func (*BaseComponent) CopyToFile

func (base *BaseComponent) CopyToFile(options CopyToFileOptions) error

func (*BaseComponent) CreateDir

func (base *BaseComponent) CreateDir(options CreateDirOptions) error

Directory operations

func (*BaseComponent) CreateFile

func (base *BaseComponent) CreateFile(options CreateFileOptions) (*handlemap.Handle, error)

File operations

func (base *BaseComponent) CreateLink(options CreateLinkOptions) error

Symlink operations

func (*BaseComponent) DeleteDir

func (base *BaseComponent) DeleteDir(options DeleteDirOptions) error

func (*BaseComponent) DeleteFile

func (base *BaseComponent) DeleteFile(options DeleteFileOptions) error

func (*BaseComponent) FileUsed

func (base *BaseComponent) FileUsed(name string) error

func (*BaseComponent) FlushFile

func (base *BaseComponent) FlushFile(options FlushFileOptions) error

func (*BaseComponent) GetAttr

func (base *BaseComponent) GetAttr(options GetAttrOptions) (*ObjAttr, error)

Filesystem level operations

func (*BaseComponent) GetFileBlockOffsets

func (base *BaseComponent) GetFileBlockOffsets(options GetFileBlockOffsetsOptions) (*common.BlockOffsetList, error)

func (*BaseComponent) InvalidateObject

func (base *BaseComponent) InvalidateObject(name string)

func (*BaseComponent) IsDirEmpty

func (base *BaseComponent) IsDirEmpty(options IsDirEmptyOptions) bool

func (*BaseComponent) Name

func (base *BaseComponent) Name() string

Pipeline participation related methods

func (*BaseComponent) NextComponent

func (base *BaseComponent) NextComponent() Component

func (*BaseComponent) OpenDir

func (base *BaseComponent) OpenDir(options OpenDirOptions) error

func (*BaseComponent) OpenFile

func (base *BaseComponent) OpenFile(options OpenFileOptions) (*handlemap.Handle, error)

func (*BaseComponent) Priority

func (base *BaseComponent) Priority() ComponentPriority

func (*BaseComponent) ReadDir

func (base *BaseComponent) ReadDir(options ReadDirOptions) (attr []*ObjAttr, err error)

func (*BaseComponent) ReadFile

func (base *BaseComponent) ReadFile(options ReadFileOptions) (b []byte, err error)

func (*BaseComponent) ReadInBuffer

func (base *BaseComponent) ReadInBuffer(options ReadInBufferOptions) (int, error)
func (base *BaseComponent) ReadLink(options ReadLinkOptions) (string, error)

func (*BaseComponent) ReleaseFile

func (base *BaseComponent) ReleaseFile(options ReleaseFileOptions) error

func (*BaseComponent) RenameDir

func (base *BaseComponent) RenameDir(options RenameDirOptions) error

func (*BaseComponent) RenameFile

func (base *BaseComponent) RenameFile(options RenameFileOptions) error

func (*BaseComponent) SetAttr

func (base *BaseComponent) SetAttr(options SetAttrOptions) error

func (*BaseComponent) SetName

func (base *BaseComponent) SetName(name string)

func (*BaseComponent) SetNextComponent

func (base *BaseComponent) SetNextComponent(c Component)

func (*BaseComponent) Start

func (base *BaseComponent) Start(ctx context.Context) error

func (*BaseComponent) StatFs

func (base *BaseComponent) StatFs() (*common.Statfs_t, bool, error)

func (*BaseComponent) Stop

func (base *BaseComponent) Stop() error

func (*BaseComponent) StreamDir

func (base *BaseComponent) StreamDir(options StreamDirOptions) ([]*ObjAttr, string, error)

func (*BaseComponent) SyncDir

func (base *BaseComponent) SyncDir(options SyncDirOptions) error

func (*BaseComponent) SyncFile

func (base *BaseComponent) SyncFile(options SyncFileOptions) error

func (*BaseComponent) TruncateFile

func (base *BaseComponent) TruncateFile(options TruncateFileOptions) error

func (*BaseComponent) UnlinkFile

func (base *BaseComponent) UnlinkFile(options UnlinkFileOptions) error

func (*BaseComponent) WriteFile

func (base *BaseComponent) WriteFile(options WriteFileOptions) (int, error)

type ChmodOptions

type ChmodOptions struct {
	Name string
	Mode os.FileMode
}

type ChownOptions

type ChownOptions struct {
	Name  string
	Owner int
	Group int
}

type CloseDirOptions

type CloseDirOptions struct {
	Name string
}

type CloseFileOptions

type CloseFileOptions struct {
	Handle *handlemap.Handle
}

type Component

type Component interface {
	// Pipeline participation related methods
	Name() string
	SetName(string)
	Configure(bool) error
	Priority() ComponentPriority

	SetNextComponent(c Component)
	NextComponent() Component

	Start(context.Context) error
	Stop() error

	// Directory operations
	CreateDir(CreateDirOptions) error
	DeleteDir(DeleteDirOptions) error
	IsDirEmpty(IsDirEmptyOptions) bool

	OpenDir(OpenDirOptions) error
	//ReadDir: implementation expectations
	//must return ErrNotExist for absence of the requested directory
	ReadDir(ReadDirOptions) ([]*ObjAttr, error)
	StreamDir(StreamDirOptions) ([]*ObjAttr, string, error)

	CloseDir(CloseDirOptions) error

	RenameDir(RenameDirOptions) error

	// File operations
	//CreateFile Implementation expectations
	//1. must return ErrExist if file already exists
	CreateFile(CreateFileOptions) (*handlemap.Handle, error)
	DeleteFile(DeleteFileOptions) error

	OpenFile(OpenFileOptions) (*handlemap.Handle, error)
	CloseFile(CloseFileOptions) error

	RenameFile(RenameFileOptions) error

	ReadFile(ReadFileOptions) ([]byte, error)
	ReadInBuffer(ReadInBufferOptions) (int, error)

	WriteFile(WriteFileOptions) (int, error)
	TruncateFile(TruncateFileOptions) error

	CopyToFile(CopyToFileOptions) error
	CopyFromFile(CopyFromFileOptions) error

	SyncDir(SyncDirOptions) error
	SyncFile(SyncFileOptions) error
	FlushFile(FlushFileOptions) error
	ReleaseFile(ReleaseFileOptions) error
	UnlinkFile(UnlinkFileOptions) error // TODO: What does this do? Not used anywhere

	// Symlink operations
	CreateLink(CreateLinkOptions) error
	ReadLink(ReadLinkOptions) (string, error)

	// Filesystem level operations
	//GetAttr: Implementation expectations:
	//1. must return ErrNotExist for absence of a file/directory/symlink
	//2. must return valid nodeID that was passed with any create/update operations for eg: SetAttr, CreateFile, CreateDir etc
	GetAttr(GetAttrOptions) (*ObjAttr, error)
	SetAttr(SetAttrOptions) error

	Chmod(ChmodOptions) error
	Chown(ChownOptions) error
	//InvalidateObject: function used to clear any inode information relating to a particular fs object
	InvalidateObject(string) // TODO: What does this do? Why do we need it if its a noop?
	GetFileBlockOffsets(options GetFileBlockOffsetsOptions) (*common.BlockOffsetList, error)

	FileUsed(name string) error
	StatFs() (*common.Statfs_t, bool, error)
}

Component : Base internal for every component to participate in pipeline

type ComponentPriority

type ComponentPriority int

func (ComponentPriority) Consumer

func (ComponentPriority) LevelMid

func (ComponentPriority) LevelOne

func (ComponentPriority) LevelTwo

func (ComponentPriority) Producer

type CopyFromFileOptions

type CopyFromFileOptions struct {
	Name     string
	File     *os.File
	Metadata map[string]string
}

type CopyToFileOptions

type CopyToFileOptions struct {
	Name   string
	Offset int64
	Count  int64
	File   *os.File
}

type CreateDirOptions

type CreateDirOptions struct {
	Name string
	Mode os.FileMode
}

type CreateFileOptions

type CreateFileOptions struct {
	Name string
	Mode os.FileMode
}

type CreateLinkOptions

type CreateLinkOptions struct {
	Name   string
	Target string
}

type DeleteDirOptions

type DeleteDirOptions struct {
	Name string
}

type DeleteFileOptions

type DeleteFileOptions struct {
	Name string
}

type FlushFileOptions

type FlushFileOptions struct {
	Handle *handlemap.Handle
}

type GetAttrOptions

type GetAttrOptions struct {
	Name             string
	RetrieveMetadata bool
}

type GetFileBlockOffsetsOptions

type GetFileBlockOffsetsOptions struct {
	Name string
}

type IsDirEmptyOptions

type IsDirEmptyOptions struct {
	Name string
}

type MockComponent

type MockComponent struct {
	// contains filtered or unexported fields
}

MockComponent is a mock of Component interface.

func NewMockComponent

func NewMockComponent(ctrl *gomock.Controller) *MockComponent

NewMockComponent creates a new mock instance.

func (*MockComponent) Chmod

func (m *MockComponent) Chmod(arg0 ChmodOptions) error

Chmod mocks base method.

func (*MockComponent) Chown

func (m *MockComponent) Chown(arg0 ChownOptions) error

Chown mocks base method.

func (*MockComponent) CloseDir

func (m *MockComponent) CloseDir(arg0 CloseDirOptions) error

CloseDir mocks base method.

func (*MockComponent) CloseFile

func (m *MockComponent) CloseFile(arg0 CloseFileOptions) error

CloseFile mocks base method.

func (*MockComponent) Configure

func (m *MockComponent) Configure(arg0 bool) error

Configure mocks base method.

func (*MockComponent) CopyFromFile

func (m *MockComponent) CopyFromFile(arg0 CopyFromFileOptions) error

CopyFromFile mocks base method.

func (*MockComponent) CopyToFile

func (m *MockComponent) CopyToFile(arg0 CopyToFileOptions) error

CopyToFile mocks base method.

func (*MockComponent) CreateDir

func (m *MockComponent) CreateDir(arg0 CreateDirOptions) error

CreateDir mocks base method.

func (*MockComponent) CreateFile

func (m *MockComponent) CreateFile(arg0 CreateFileOptions) (*handlemap.Handle, error)

CreateFile mocks base method.

func (m *MockComponent) CreateLink(arg0 CreateLinkOptions) error

CreateLink mocks base method.

func (*MockComponent) DeleteDir

func (m *MockComponent) DeleteDir(arg0 DeleteDirOptions) error

DeleteDir mocks base method.

func (*MockComponent) DeleteFile

func (m *MockComponent) DeleteFile(arg0 DeleteFileOptions) error

DeleteFile mocks base method.

func (*MockComponent) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockComponent) FileUsed

func (m *MockComponent) FileUsed(arg0 string) error

FileUsed mocks base method.

func (*MockComponent) FlushFile

func (m *MockComponent) FlushFile(arg0 FlushFileOptions) error

FlushFile mocks base method.

func (*MockComponent) GetAttr

func (m *MockComponent) GetAttr(arg0 GetAttrOptions) (*ObjAttr, error)

GetAttr mocks base method.

func (*MockComponent) GetFileBlockOffsets

func (m *MockComponent) GetFileBlockOffsets(arg0 GetFileBlockOffsetsOptions) (*common.BlockOffsetList, error)

GetFileBlockOffsets mocks base method.

func (*MockComponent) InvalidateObject

func (m *MockComponent) InvalidateObject(arg0 string)

InvalidateObject mocks base method.

func (*MockComponent) IsDirEmpty

func (m *MockComponent) IsDirEmpty(arg0 IsDirEmptyOptions) bool

IsDirEmpty mocks base method.

func (*MockComponent) Name

func (m *MockComponent) Name() string

Name mocks base method.

func (*MockComponent) NextComponent

func (m *MockComponent) NextComponent() Component

NextComponent mocks base method.

func (*MockComponent) OpenDir

func (m *MockComponent) OpenDir(arg0 OpenDirOptions) error

OpenDir mocks base method.

func (*MockComponent) OpenFile

func (m *MockComponent) OpenFile(arg0 OpenFileOptions) (*handlemap.Handle, error)

OpenFile mocks base method.

func (*MockComponent) Priority

func (m *MockComponent) Priority() ComponentPriority

Priority mocks base method.

func (*MockComponent) ReadDir

func (m *MockComponent) ReadDir(arg0 ReadDirOptions) ([]*ObjAttr, error)

ReadDir mocks base method.

func (*MockComponent) ReadFile

func (m *MockComponent) ReadFile(arg0 ReadFileOptions) ([]byte, error)

ReadFile mocks base method.

func (*MockComponent) ReadInBuffer

func (m *MockComponent) ReadInBuffer(arg0 ReadInBufferOptions) (int, error)

ReadInBuffer mocks base method.

func (m *MockComponent) ReadLink(arg0 ReadLinkOptions) (string, error)

ReadLink mocks base method.

func (*MockComponent) ReleaseFile

func (m *MockComponent) ReleaseFile(arg0 ReleaseFileOptions) error

ReleaseFile mocks base method.

func (*MockComponent) RenameDir

func (m *MockComponent) RenameDir(arg0 RenameDirOptions) error

RenameDir mocks base method.

func (*MockComponent) RenameFile

func (m *MockComponent) RenameFile(arg0 RenameFileOptions) error

RenameFile mocks base method.

func (*MockComponent) SetAttr

func (m *MockComponent) SetAttr(arg0 SetAttrOptions) error

SetAttr mocks base method.

func (*MockComponent) SetName

func (m *MockComponent) SetName(arg0 string)

SetName mocks base method.

func (*MockComponent) SetNextComponent

func (m *MockComponent) SetNextComponent(arg0 Component)

SetNextComponent mocks base method.

func (*MockComponent) Start

func (m *MockComponent) Start(arg0 context.Context) error

Start mocks base method.

func (*MockComponent) StatFs

func (m *MockComponent) StatFs() (*common.Statfs_t, bool, error)

Get stats of cloudfuse mount.

func (*MockComponent) Stop

func (m *MockComponent) Stop() error

Stop mocks base method.

func (*MockComponent) StreamDir

func (m *MockComponent) StreamDir(arg0 StreamDirOptions) ([]*ObjAttr, string, error)

ReadDir mocks base method.

func (*MockComponent) SyncDir

func (m *MockComponent) SyncDir(arg0 SyncDirOptions) error

SyncFile mocks base method.

func (*MockComponent) SyncFile

func (m *MockComponent) SyncFile(arg0 SyncFileOptions) error

SyncFile mocks base method.

func (*MockComponent) TruncateFile

func (m *MockComponent) TruncateFile(arg0 TruncateFileOptions) error

TruncateFile mocks base method.

func (*MockComponent) UnlinkFile

func (m *MockComponent) UnlinkFile(arg0 UnlinkFileOptions) error

UnlinkFile mocks base method.

func (*MockComponent) WriteFile

func (m *MockComponent) WriteFile(arg0 WriteFileOptions) (int, error)

WriteFile mocks base method.

type MockComponentMockRecorder

type MockComponentMockRecorder struct {
	// contains filtered or unexported fields
}

MockComponentMockRecorder is the mock recorder for MockComponent.

func (*MockComponentMockRecorder) Chmod

func (mr *MockComponentMockRecorder) Chmod(arg0 interface{}) *gomock.Call

Chmod indicates an expected call of Chmod.

func (*MockComponentMockRecorder) Chown

func (mr *MockComponentMockRecorder) Chown(arg0 interface{}) *gomock.Call

Chown indicates an expected call of Chown.

func (*MockComponentMockRecorder) CloseDir

func (mr *MockComponentMockRecorder) CloseDir(arg0 interface{}) *gomock.Call

CloseDir indicates an expected call of CloseDir.

func (*MockComponentMockRecorder) CloseFile

func (mr *MockComponentMockRecorder) CloseFile(arg0 interface{}) *gomock.Call

CloseFile indicates an expected call of CloseFile.

func (*MockComponentMockRecorder) Configure

func (mr *MockComponentMockRecorder) Configure(arg0 interface{}) *gomock.Call

Configure indicates an expected call of Configure.

func (*MockComponentMockRecorder) CopyFromFile

func (mr *MockComponentMockRecorder) CopyFromFile(arg0 interface{}) *gomock.Call

CopyFromFile indicates an expected call of CopyFromFile.

func (*MockComponentMockRecorder) CopyToFile

func (mr *MockComponentMockRecorder) CopyToFile(arg0 interface{}) *gomock.Call

CopyToFile indicates an expected call of CopyToFile.

func (*MockComponentMockRecorder) CreateDir

func (mr *MockComponentMockRecorder) CreateDir(arg0 interface{}) *gomock.Call

CreateDir indicates an expected call of CreateDir.

func (*MockComponentMockRecorder) CreateFile

func (mr *MockComponentMockRecorder) CreateFile(arg0 interface{}) *gomock.Call

CreateFile indicates an expected call of CreateFile.

func (mr *MockComponentMockRecorder) CreateLink(arg0 interface{}) *gomock.Call

CreateLink indicates an expected call of CreateLink.

func (*MockComponentMockRecorder) DeleteDir

func (mr *MockComponentMockRecorder) DeleteDir(arg0 interface{}) *gomock.Call

DeleteDir indicates an expected call of DeleteDir.

func (*MockComponentMockRecorder) DeleteFile

func (mr *MockComponentMockRecorder) DeleteFile(arg0 interface{}) *gomock.Call

DeleteFile indicates an expected call of DeleteFile.

func (*MockComponentMockRecorder) FileUsed

func (mr *MockComponentMockRecorder) FileUsed(arg0 interface{}) *gomock.Call

FileUsed indicates an expected call to FileUsed.

func (*MockComponentMockRecorder) FlushFile

func (mr *MockComponentMockRecorder) FlushFile(arg0 interface{}) *gomock.Call

FlushFile indicates an expected call of FlushFile.

func (*MockComponentMockRecorder) GetAttr

func (mr *MockComponentMockRecorder) GetAttr(arg0 interface{}) *gomock.Call

GetAttr indicates an expected call of GetAttr.

func (*MockComponentMockRecorder) GetFileBlockOffsets

func (mr *MockComponentMockRecorder) GetFileBlockOffsets(arg0 interface{}) *gomock.Call

GetFileBlockOffsets maps offsets to block ids.

func (*MockComponentMockRecorder) InvalidateObject

func (mr *MockComponentMockRecorder) InvalidateObject(arg0 interface{}) *gomock.Call

InvalidateObject indicates an expected call of InvalidateObject.

func (*MockComponentMockRecorder) IsDirEmpty

func (mr *MockComponentMockRecorder) IsDirEmpty(arg0 interface{}) *gomock.Call

IsDirEmpty indicates an expected call of IsDirEmpty.

func (*MockComponentMockRecorder) Name

Name indicates an expected call of Name.

func (*MockComponentMockRecorder) NextComponent

func (mr *MockComponentMockRecorder) NextComponent() *gomock.Call

NextComponent indicates an expected call of NextComponent.

func (*MockComponentMockRecorder) OpenDir

func (mr *MockComponentMockRecorder) OpenDir(arg0 interface{}) *gomock.Call

OpenDir indicates an expected call of OpenDir.

func (*MockComponentMockRecorder) OpenFile

func (mr *MockComponentMockRecorder) OpenFile(arg0 interface{}) *gomock.Call

OpenFile indicates an expected call of OpenFile.

func (*MockComponentMockRecorder) Priority

func (mr *MockComponentMockRecorder) Priority() *gomock.Call

Priority indicates an expected call of Priority.

func (*MockComponentMockRecorder) ReadDir

func (mr *MockComponentMockRecorder) ReadDir(arg0 interface{}) *gomock.Call

ReadDir indicates an expected call of ReadDir.

func (*MockComponentMockRecorder) ReadFile

func (mr *MockComponentMockRecorder) ReadFile(arg0 interface{}) *gomock.Call

ReadFile indicates an expected call of ReadFile.

func (*MockComponentMockRecorder) ReadInBuffer

func (mr *MockComponentMockRecorder) ReadInBuffer(arg0 interface{}) *gomock.Call

ReadInBuffer indicates an expected call of ReadInBuffer.

func (mr *MockComponentMockRecorder) ReadLink(arg0 interface{}) *gomock.Call

ReadLink indicates an expected call of ReadLink.

func (*MockComponentMockRecorder) ReleaseFile

func (mr *MockComponentMockRecorder) ReleaseFile(arg0 interface{}) *gomock.Call

ReleaseFile indicates an expected call of ReleaseFile.

func (*MockComponentMockRecorder) RenameDir

func (mr *MockComponentMockRecorder) RenameDir(arg0 interface{}) *gomock.Call

RenameDir indicates an expected call of RenameDir.

func (*MockComponentMockRecorder) RenameFile

func (mr *MockComponentMockRecorder) RenameFile(arg0 interface{}) *gomock.Call

RenameFile indicates an expected call of RenameFile.

func (*MockComponentMockRecorder) SetAttr

func (mr *MockComponentMockRecorder) SetAttr(arg0 interface{}) *gomock.Call

SetAttr indicates an expected call of SetAttr.

func (*MockComponentMockRecorder) SetName

func (mr *MockComponentMockRecorder) SetName(arg0 interface{}) *gomock.Call

SetName indicates an expected call of SetName.

func (*MockComponentMockRecorder) SetNextComponent

func (mr *MockComponentMockRecorder) SetNextComponent(arg0 interface{}) *gomock.Call

SetNextComponent indicates an expected call of SetNextComponent.

func (*MockComponentMockRecorder) Start

func (mr *MockComponentMockRecorder) Start(arg0 interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockComponentMockRecorder) StatFs

func (mr *MockComponentMockRecorder) StatFs() *gomock.Call

Get stats of cloudfuse mount.

func (*MockComponentMockRecorder) Stop

Stop indicates an expected call of Stop.

func (*MockComponentMockRecorder) SyncDir

func (mr *MockComponentMockRecorder) SyncDir(arg0 interface{}) *gomock.Call

FlushFile indicates an expected call of FlushFile.

func (*MockComponentMockRecorder) SyncFile

func (mr *MockComponentMockRecorder) SyncFile(arg0 interface{}) *gomock.Call

FlushFile indicates an expected call of FlushFile.

func (*MockComponentMockRecorder) TruncateFile

func (mr *MockComponentMockRecorder) TruncateFile(arg0 interface{}) *gomock.Call

TruncateFile indicates an expected call of TruncateFile.

func (*MockComponentMockRecorder) UnlinkFile

func (mr *MockComponentMockRecorder) UnlinkFile(arg0 interface{}) *gomock.Call

UnlinkFile indicates an expected call of UnlinkFile.

func (*MockComponentMockRecorder) WriteFile

func (mr *MockComponentMockRecorder) WriteFile(arg0 interface{}) *gomock.Call

WriteFile indicates an expected call of WriteFile.

type NewComponent

type NewComponent func() Component

NewComponent : Function that all components have to register to allow their instantiation

type ObjAttr

type ObjAttr struct {
	Mtime    time.Time       // modified time
	Atime    time.Time       // access time
	Ctime    time.Time       // change time
	Crtime   time.Time       // creation time
	Size     int64           // size of the file/directory
	Mode     os.FileMode     // permissions in 0xxx format
	Flags    common.BitMap16 // flags
	Path     string          // full path
	Name     string          // base name of the path
	MD5      []byte
	Metadata map[string]string // extra information to preserve
}

ObjAttr : Attributes of any file/directory

func CreateObjAttr

func CreateObjAttr(objectPath string, size int64, lastModified time.Time) (attr *ObjAttr)

create an object attributes struct

func CreateObjAttrDir

func CreateObjAttrDir(path string) (attr *ObjAttr)

create an object attributes struct for a directory

func (*ObjAttr) IsDir

func (attr *ObjAttr) IsDir() bool

IsDir : Test blob is a directory or not

func (*ObjAttr) IsMetadataRetrieved

func (attr *ObjAttr) IsMetadataRetrieved() bool

IsMetadataRetrieved : Whether or not metadata has been retrieved for this path. Datalake list paths does not support returning x-ms-properties (metadata), so we cannot be sure if the path is a symlink or not.

func (*ObjAttr) IsModeDefault

func (attr *ObjAttr) IsModeDefault() bool

IsModeDefault : Whether or not to use the default mode. This is set in any storage service that does not support chmod/chown.

func (attr *ObjAttr) IsSymlink() bool

IsSymlink : Test blob is a symlink or not

type OpenDirOptions

type OpenDirOptions struct {
	Name string
}

type OpenFileOptions

type OpenFileOptions struct {
	Name  string
	Flags int
	Mode  os.FileMode
}

type Pipeline

type Pipeline struct {
	Header Component
	// contains filtered or unexported fields
}

Pipeline: Base pipeline structure holding list of components deployed along with the head of pipeline

func NewPipeline

func NewPipeline(components []string, isParent bool) (*Pipeline, error)

NewPipeline : Using a list of strings holding name of components, create and configure the component objects

func (*Pipeline) Create

func (p *Pipeline) Create()

Create : Use the initialized objects to form a pipeline by registering next component to each component

func (*Pipeline) Start

func (p *Pipeline) Start(ctx context.Context) (err error)

Start : Start the pipeline by calling 'Start' method of each component in reverse order of chaining

func (*Pipeline) Stop

func (p *Pipeline) Stop() (err error)

Stop : Stop the pipeline by calling 'Stop' method of each component

type ReadDirOptions

type ReadDirOptions struct {
	Name string
}

type ReadFileOptions

type ReadFileOptions struct {
	Handle *handlemap.Handle
}

type ReadInBufferOptions

type ReadInBufferOptions struct {
	Handle *handlemap.Handle
	Offset int64
	Data   []byte
}

type ReadLinkOptions

type ReadLinkOptions struct {
	Name string
}

type ReleaseFileOptions

type ReleaseFileOptions struct {
	Handle *handlemap.Handle
}

type RenameDirOptions

type RenameDirOptions struct {
	Src string
	Dst string
}

type RenameFileOptions

type RenameFileOptions struct {
	Src string
	Dst string
}

type SetAttrOptions

type SetAttrOptions struct {
	Name string
	Attr *ObjAttr
}

type StreamDirOptions

type StreamDirOptions struct {
	Name   string
	Offset uint64
	Token  string
	Count  int32
}

type SyncDirOptions

type SyncDirOptions struct {
	Name string
}

type SyncFileOptions

type SyncFileOptions struct {
	Handle *handlemap.Handle
}

type TruncateFileOptions

type TruncateFileOptions struct {
	Name string
	Size int64
}

type UnlinkFileOptions

type UnlinkFileOptions struct {
	Name string
}

type WriteFileOptions

type WriteFileOptions struct {
	Handle   *handlemap.Handle
	Offset   int64
	Data     []byte
	Metadata map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL