fs

package
v0.0.0-...-04d6450 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fs is just a simple encapsulation of index.NewFileSystemDirectory for logging time cost.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsDirectory

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

func NewFsDirectory

func NewFsDirectory(path string) *FsDirectory

func (*FsDirectory) List

func (d *FsDirectory) List(kind string) ([]uint64, error)

func (*FsDirectory) Load

func (d *FsDirectory) Load(kind string, id uint64) (*segment.Data, io.Closer, error)

func (*FsDirectory) Lock

func (d *FsDirectory) Lock() error

func (*FsDirectory) Persist

func (d *FsDirectory) Persist(
	kind string,
	id uint64,
	w index.WriterTo,
	closeCh chan struct{},
) error

func (*FsDirectory) Remove

func (d *FsDirectory) Remove(kind string, id uint64) error

func (*FsDirectory) Setup

func (d *FsDirectory) Setup(readOnly bool) error

func (*FsDirectory) Stats

func (d *FsDirectory) Stats() (numFilesOnDisk, numBytesUsedDisk uint64)

func (*FsDirectory) Sync

func (d *FsDirectory) Sync() error

func (*FsDirectory) Unlock

func (d *FsDirectory) Unlock() error

Jump to

Keyboard shortcuts

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