size_tracker

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSizeTrackerComponent

func NewSizeTrackerComponent() internal.Component

Pipeline will call this method to create your object, initialize your variables here << DO NOT DELETE ANY AUTO GENERATED CODE HERE >>

Types

type MountSize

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

func CreateSizeJournal

func CreateSizeJournal(filename string) (*MountSize, error)

func (*MountSize) Add

func (ms *MountSize) Add(delta uint64) uint64

func (*MountSize) CloseFile

func (ms *MountSize) CloseFile() error

func (*MountSize) GetSize

func (ms *MountSize) GetSize() uint64

func (*MountSize) Subtract

func (ms *MountSize) Subtract(delta uint64) uint64

type SizeTracker

type SizeTracker struct {
	internal.BaseComponent
	// contains filtered or unexported fields
}

Common structure for Component

func (*SizeTracker) CommitData

func (st *SizeTracker) CommitData(opt internal.CommitDataOptions) error

func (*SizeTracker) Configure

func (st *SizeTracker) Configure(_ bool) error

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 (*SizeTracker) CopyFromFile

func (st *SizeTracker) CopyFromFile(options internal.CopyFromFileOptions) error

func (*SizeTracker) CreateFile

func (st *SizeTracker) CreateFile(options internal.CreateFileOptions) (*handlemap.Handle, error)

File operations

func (*SizeTracker) DeleteFile

func (st *SizeTracker) DeleteFile(options internal.DeleteFileOptions) error

func (*SizeTracker) FlushFile

func (st *SizeTracker) FlushFile(options internal.FlushFileOptions) error

func (*SizeTracker) Name

func (st *SizeTracker) Name() string

func (*SizeTracker) OnConfigChange

func (st *SizeTracker) OnConfigChange()

OnConfigChange : If component has registered, on config file change this method is called

func (*SizeTracker) Priority

func (st *SizeTracker) Priority() internal.ComponentPriority

func (*SizeTracker) RenameDir

func (st *SizeTracker) RenameDir(options internal.RenameDirOptions) error

func (*SizeTracker) RenameFile

func (st *SizeTracker) RenameFile(options internal.RenameFileOptions) error

func (*SizeTracker) SetName

func (st *SizeTracker) SetName(name string)

func (*SizeTracker) SetNextComponent

func (st *SizeTracker) SetNextComponent(nc internal.Component)

func (*SizeTracker) Start

func (st *SizeTracker) Start(ctx context.Context) error

Start : Pipeline calls this method to start the component functionality

this shall not block the call otherwise pipeline will not start

func (*SizeTracker) StatFs

func (st *SizeTracker) StatFs() (*common.Statfs_t, bool, error)

Filesystem level operations

func (*SizeTracker) Stop

func (st *SizeTracker) Stop() error

Stop : Stop the component functionality and kill all threads started

func (*SizeTracker) TruncateFile

func (st *SizeTracker) TruncateFile(options internal.TruncateFileOptions) error

func (*SizeTracker) WriteFile

func (st *SizeTracker) WriteFile(options internal.WriteFileOptions) (int, error)

type SizeTrackerOptions

type SizeTrackerOptions struct {
	JournalName string `config:"journal-name" yaml:"journal-name,omitempty"`
}

Structure defining your config parameters

Jump to

Keyboard shortcuts

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