buffer

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNNAMED_FILENAME = "Unnamed"
	SERIALIZED_LIMIT = 5
	UPDATE_TIME      = 5 * time.Minute
	METADATA         = "buffer_metadata.json"
)

Variables

This section is empty.

Functions

func CatNamePath

func CatNamePath(name, path string) string

func ExtraPath

func ExtraPath(fpath string) string

func SplitNamePath

func SplitNamePath(namepath string) (string, string)

Types

type FileBuffer

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

func NewFileBuffer

func NewFileBuffer(limitSize uint64, dir string) (*FileBuffer, error)

func (*FileBuffer) AddData

func (b *FileBuffer) AddData(key, fpath string)

func (*FileBuffer) BufferStatus

func (b *FileBuffer) BufferStatus() cache.Info

func (*FileBuffer) GetData

func (b *FileBuffer) GetData(key string) cache.Item

func (*FileBuffer) JoinPath

func (b *FileBuffer) JoinPath(baseDir string, subpath ...string) (string, error)

func (*FileBuffer) NewBufDir

func (b *FileBuffer) NewBufDir(subdirs ...string) (string, error)

func (*FileBuffer) NewBufPath

func (b *FileBuffer) NewBufPath(paths ...string) (string, error)

func (*FileBuffer) RemoveData

func (b *FileBuffer) RemoveData(fpath string) error

Jump to

Keyboard shortcuts

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