Categorygithub.com/RTradeLtd/go-ipfs-blockstore/v3
modulepackage
3.0.0-rc2
Repository: https://github.com/rtradeltd/go-ipfs-blockstore.git
Documentation: pkg.go.dev

# README

go-ipfs-blockstore

standard-readme compliant GoDoc Build Status

go-ipfs-blockstore implements a thin wrapper over a datastore, giving a clean interface for Getting and Putting block objects.

Lead Maintainer

Steven Allen

Table of Contents

Install

go-ipfs-blockstore works like a regular Go module:

> go get github.com/ipfs/go-ipfs-blockstore

Usage

import "github.com/ipfs/go-ipfs-blockstore"

Check the GoDoc documentation

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Protocol Labs, Inc.

# Functions

CachedBlockstore returns a blockstore wrapped in an ARCCache and then in a bloom filter cache, if the options indicate it.
DefaultCacheOpts returns a CacheOpts initialized with default values.
NewBlockstore returns a default Blockstore implementation using the provided datastore.Batching backend.
NewGCBlockstore returns a default implementation of GCBlockstore using the given Blockstore and GCLocker.
NewGCLocker returns a default implementation of GCLocker using standard [RW] mutexes.
No description provided by the author

# Variables

BlockPrefix namespaces blockstore datastores.
ErrHashMismatch is an error returned when the hash of a block is different than expected.
ErrNotFound is an error returned when a block is not found.

# Structs

CacheOpts wraps options for CachedBlockStore().

# Type aliases

Blockstore aliases upstream blockstore interface.
GCBlockstore aliases upstream gcblockstore interface.
GCLocker aliases upstream gclocker interface.
Unlocker aliases upstream unlocker interface.