chunkgetter

package
v0.0.0-...-6ffa3c9 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcChunkGetter

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

func (GrpcChunkGetter) GetChunk

func (g GrpcChunkGetter) GetChunk(token types.DecryptTaskToken, path string, index int) (chunk []byte, errStr string)

func (GrpcChunkGetter) GetTotalBytes

func (g GrpcChunkGetter) GetTotalBytes(path string) (totalBytes int, errStr string)

type GrpcRateLimiter

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

func (GrpcRateLimiter) CanServe

func (g GrpcRateLimiter) CanServe(removeAddr, path, query string, token, guide []byte) bool

type IpfsStat

type IpfsStat struct {
	CumulativeSize uint64
	Size           uint64
	SizeLocal      uint64
}

type KuboChunkGetter

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

func NewKuboChunkGetter

func NewKuboChunkGetter(server string) *KuboChunkGetter

func (*KuboChunkGetter) GetChunk

func (kcg *KuboChunkGetter) GetChunk(token types.DecryptTaskToken, path string, index int) (chunk []byte, errStr string)

https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-cat

func (*KuboChunkGetter) GetTotalBytes

func (kcg *KuboChunkGetter) GetTotalBytes(path string) (totalBytes int, errStr string)

https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-stat

type RpcxChunkGetter

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

func (RpcxChunkGetter) GetChunk

func (g RpcxChunkGetter) GetChunk(token types.DecryptTaskToken, path string, index int) (chunk []byte, errStr string)

func (RpcxChunkGetter) GetTotalBytes

func (g RpcxChunkGetter) GetTotalBytes(path string) (totalBytes int, errStr string)

Jump to

Keyboard shortcuts

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