netstore

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Overview

Package netstore provides an abstraction layer over the Aurora local storage layer that leverages connectivity with other peers in order to retrieve chunks from the network that cannot be found locally.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecoveryAttempt = errors.New("failed to retrieve chunk, recovery initiated")
)

Functions

This section is empty.

Types

type Store added in v1.3.0

type Store struct {
	storage.Storer
	// contains filtered or unexported fields
}

func New

New returns a new NetStore that wraps a given Storer.

func (*Store) Get added in v1.3.0

func (s *Store) Get(ctx context.Context, mode storage.ModeGet, addr boson.Address) (ch boson.Chunk, err error)

Get retrieves a given chunk address. It will request a chunk from the network whenever it cannot be found locally.

func (*Store) SetChunkInfo added in v1.3.0

func (s *Store) SetChunkInfo(chunkInfo chunkinfo.Interface)

Jump to

Keyboard shortcuts

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