storage

package
v0.0.0-...-0e71bb7 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteRange

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

func BRange

func BRange(start, end uint32) ByteRange

func BRangeStart

func BRangeStart(start uint32) ByteRange

type Fetcher

type Fetcher interface {
	// Fetch the byte range. Start and end of byte range are inclusive.
	Fetch(objectName string, bRange ByteRange) []byte
	ListFiles() []string
}

func InitializeFsService

func InitializeFsService(directory string) Fetcher

func InitializeS3Service

func InitializeS3Service(bucketName, region string) Fetcher

type FsImpl

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

func (*FsImpl) Fetch

func (fs *FsImpl) Fetch(path string, brange ByteRange) []byte

func (*FsImpl) ListFiles

func (fs *FsImpl) ListFiles() []string

type S3Impl

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

func (*S3Impl) Fetch

func (service *S3Impl) Fetch(objectName string, bRange ByteRange) []byte

func (*S3Impl) ListFiles

func (service *S3Impl) ListFiles() []string

Jump to

Keyboard shortcuts

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