blocks

package module
v0.0.0-...-3c4b020 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 5 Imported by: 0

README

[DEPRECATED] go-blocks - ipfs blocks

standard-readme compliant Build Status

(Deprecated) Blockservice and blockstore for go-ipfs

IMPORTANT! This repository is dead and has long been continued within go-ipfs.
Want to hack on IPFS?

License

MIT

Documentation

Overview

package blocks contains the lowest level of ipfs data structures, the raw block with a checksum.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Multihash mh.Multihash
	Data      []byte
}

Block is a singular block of data in ipfs

func NewBlock

func NewBlock(data []byte) *Block

NewBlock creates a Block object from opaque data. It will hash the data.

func NewBlockWithHash

func NewBlockWithHash(data []byte, h mh.Multihash) (*Block, error)

NewBlockWithHash creates a new block when the hash of the data is already known, this is used to save time in situations where we are able to be confident that the data is correct

func (*Block) Key

func (b *Block) Key() key.Key

Key returns the block's Multihash as a Key value.

func (*Block) Loggable

func (b *Block) Loggable() map[string]interface{}

func (*Block) String

func (b *Block) String() string

Directories

Path Synopsis
Godeps
_workspace/src/github.com/hashicorp/golang-lru
This package provides a simple LRU cache.
This package provides a simple LRU cache.
_workspace/src/github.com/jbenet/go-base58
Package base58 provides base58-check encoding.
Package base58 provides base58-check encoding.
_workspace/src/github.com/jbenet/go-datastore/flatfs
Package flatfs is a Datastore implementation that stores all objects in a two-level directory structure in the local file system, regardless of the hierarchy of the keys.
Package flatfs is a Datastore implementation that stores all objects in a two-level directory structure in the local file system, regardless of the hierarchy of the keys.
_workspace/src/github.com/jbenet/go-datastore/fs
Package fs is a simple Datastore implementation that stores keys are directories and files, mirroring the key.
Package fs is a simple Datastore implementation that stores keys are directories and files, mirroring the key.
_workspace/src/github.com/jbenet/go-datastore/keytransform
Package keytransform introduces a Datastore Shim that transforms keys before passing them to its child.
Package keytransform introduces a Datastore Shim that transforms keys before passing them to its child.
_workspace/src/github.com/jbenet/go-datastore/measure
Package measure provides a Datastore wrapper that records metrics using github.com/codahale/metrics.
Package measure provides a Datastore wrapper that records metrics using github.com/codahale/metrics.
_workspace/src/github.com/jbenet/go-datastore/mount
Package mount provides a Datastore that has other Datastores mounted at various key prefixes.
Package mount provides a Datastore that has other Datastores mounted at various key prefixes.
_workspace/src/github.com/jbenet/go-datastore/namespace
Package namespace introduces a namespace Datastore Shim, which basically mounts the entire child datastore under a prefix.
Package namespace introduces a namespace Datastore Shim, which basically mounts the entire child datastore under a prefix.
_workspace/src/github.com/jbenet/go-multihash/opts
Package opts helps to write commands which may take multihash options.
Package opts helps to write commands which may take multihash options.
_workspace/src/github.com/jbenet/goprocess
Package goprocess introduces a Process abstraction that allows simple organization, and orchestration of work.
Package goprocess introduces a Process abstraction that allows simple organization, and orchestration of work.
_workspace/src/github.com/jbenet/goprocess/periodic
Package periodic is part of github.com/jbenet/goprocess.
Package periodic is part of github.com/jbenet/goprocess.
_workspace/src/github.com/jbenet/goprocess/ratelimit
Package ratelimit is part of github.com/jbenet/goprocess.
Package ratelimit is part of github.com/jbenet/goprocess.
_workspace/src/github.com/satori/go.uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package uuid provides implementation of Universally Unique Identifier (UUID).
_workspace/src/github.com/steakknife/hamming
hamming distance calculations in Go https://github.com/steakknife/hamming Copyright © 2014, 2015 Barry Allard MIT license Usage The functions are named (CountBits)?(Byte|Uint64)s?.
hamming distance calculations in Go https://github.com/steakknife/hamming Copyright © 2014, 2015 Barry Allard MIT license Usage The functions are named (CountBits)?(Byte|Uint64)s?.
_workspace/src/golang.org/x/crypto/sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/gopkg.in/check.v1
Package check is a rich testing extension for Go's testing package.
Package check is a rich testing extension for Go's testing package.
package blockservice implements a BlockService interface that provides a single GetBlock/AddBlock interface that seamlessly retrieves data either locally or from a remote peer through the exchange.
package blockservice implements a BlockService interface that provides a single GetBlock/AddBlock interface that seamlessly retrieves data either locally or from a remote peer through the exchange.
exchange
package exchange defines the IPFS Exchange interface this is here to avoid vendoring IPFS for now.
package exchange defines the IPFS Exchange interface this is here to avoid vendoring IPFS for now.
exchange/offline
package offline implements an object that implements the exchange interface but returns nil values to every request.
package offline implements an object that implements the exchange interface but returns nil values to every request.
worker
TODO FIXME name me
TODO FIXME name me
package blockstore implements a thin wrapper over a datastore, giving a clean interface for Getting and Putting block objects.
package blockstore implements a thin wrapper over a datastore, giving a clean interface for Getting and Putting block objects.
package bloom implements a simple bloom filter.
package bloom implements a simple bloom filter.
Package util implements various utility functions used within ipfs that do not currently have a better place to live.
Package util implements various utility functions used within ipfs that do not currently have a better place to live.
package set contains various different types of 'BlockSet's
package set contains various different types of 'BlockSet's
thirdparty

Jump to

Keyboard shortcuts

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