internal

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterChunks

func FilterChunks(input []types.StoredItem) []types.StoredItem

func MaxInt64

func MaxInt64(a, b int64) int64

func MinInt64

func MinInt64(a, b int64) int64

func NotEmptyJoin

func NotEmptyJoin(a []string, sep string) string

Similar to to `strings.Join`, but ignores blank strings

func RandomString

func RandomString(n int) string

RandomString generates a random string of length n. The characters drawn are alphanumeric. The first string is always a letter. The strings are not cryptographically random.

Types

type DefaultChunkUtils

type DefaultChunkUtils struct {
	ChunkSize   uint64
	Server      rsstorage.StorageServer
	Waiter      rsstorage.ChunkWaiter
	Notifier    rsstorage.ChunkNotifier
	PollTimeout time.Duration
	MaxAttempts int
}

func (*DefaultChunkUtils) ReadChunked

func (w *DefaultChunkUtils) ReadChunked(dir, address string) (io.ReadCloser, *types.ChunksInfo, int64, time.Time, error)

func (*DefaultChunkUtils) WriteChunked

func (w *DefaultChunkUtils) WriteChunked(dir, address string, sz uint64, resolve types.Resolver) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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