filesystem

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	objstore.Bucket
	// contains filtered or unexported fields
}

func NewBucket

func NewBucket(rootDir string, middlewares ...func(objstore.Bucket) (objstore.Bucket, error)) (*Bucket, error)

NewBucket returns a new filesystem.Bucket.

func (*Bucket) ReaderAt

func (b *Bucket) ReaderAt(ctx context.Context, filename string) (phlareobjstore.ReaderAtCloser, error)

func (*Bucket) ReaderWithExpectedErrs added in v1.1.0

ReaderWithExpectedErrs implements objstore.Bucket.

func (*Bucket) WithExpectedErrs added in v1.1.0

WithExpectedErrs implements objstore.Bucket.

type Config

type Config struct {
	Directory string `yaml:"dir"`
}

Config stores the configuration for storing and accessing objects in the local filesystem.

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers the flags for filesystem storage

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers the flags for filesystem storage with the provided prefix

func (*Config) RegisterFlagsWithPrefixAndDefaultDirectory

func (cfg *Config) RegisterFlagsWithPrefixAndDefaultDirectory(prefix, dir string, f *flag.FlagSet)

RegisterFlagsWithPrefixAndDefaultDirectory registers the flags for filesystem storage with the provided prefix and sets the default directory to dir.

type FileReaderAt

type FileReaderAt struct {
	*os.File
}

func (*FileReaderAt) ReadAt

func (b *FileReaderAt) ReadAt(p []byte, off int64) (n int, err error)

Jump to

Keyboard shortcuts

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