cachingreader

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectServer

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

func New added in v0.9.0

func New(params Params) (*ObjectServer, error)

func NewObjectServer

func NewObjectServer(baseDir string, maxCachedBytes uint64,
	objectServerAddress string, logger log.DebugLogger) (*ObjectServer, error)

Deprecated.

func (*ObjectServer) FetchObjects

func (objSrv *ObjectServer) FetchObjects(hashes []hash.Hash) error

func (*ObjectServer) Flush added in v0.9.0

func (objSrv *ObjectServer) Flush() error

func (*ObjectServer) GetObjects

func (objSrv *ObjectServer) GetObjects(hashes []hash.Hash) (
	objectserver.ObjectsReader, error)

func (*ObjectServer) GetStats added in v0.3.4

func (objSrv *ObjectServer) GetStats() Stats

func (*ObjectServer) LinkObject

func (objSrv *ObjectServer) LinkObject(filename string,
	hashVal hash.Hash) (bool, error)

func (*ObjectServer) WriteHtml

func (objSrv *ObjectServer) WriteHtml(writer io.Writer)

type Params added in v0.9.0

type Params struct {
	BaseDirectory       string
	Logger              log.DebugLogger
	MaximumCachedBytes  uint64               // Default: 1GiB.
	ObjectClient        *client.ObjectClient // Exclusive of ObjectServerAddress
	ObjectServerAddress string               // Exclusive of ObjectClient.
}

type Stats added in v0.3.4

type Stats struct {
	CachedBytes      uint64 // Includes LruBytes.
	DownloadingBytes uint64 // Objects being downloaded and cached.
	LruBytes         uint64 // Cached but not in-use objects.

}

Jump to

Keyboard shortcuts

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