storage_default

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 11 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

storage-default

infra.Go default storage driver.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Driver

func Driver() storage.Driver

Types

type RangeFileReader added in v0.1.1

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

RangeFileReader 封装了 SectionReader,同时支持 Closer

func NewRangeFileReader added in v0.1.1

func NewRangeFileReader(filePath string, start, length int64) (*RangeFileReader, error)

NewRangeFileReader 创建 RangeFileReader,支持 Reader、Closer、Seeker

func (*RangeFileReader) Close added in v0.1.1

func (r *RangeFileReader) Close() error

Close 关闭文件

func (*RangeFileReader) Read added in v0.1.1

func (r *RangeFileReader) Read(p []byte) (int, error)

Read 读取数据

func (*RangeFileReader) ReadAt added in v0.1.1

func (r *RangeFileReader) ReadAt(p []byte, off int64) (int, error)

ReadAt 直接从指定位置读取

func (*RangeFileReader) Seek added in v0.1.1

func (r *RangeFileReader) Seek(offset int64, whence int) (int64, error)

Seek 移动读取位置

Jump to

Keyboard shortcuts

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