Documentation ¶
Overview ¶
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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("blockservice: key not found")
Functions ¶
This section is empty.
Types ¶
type BlockService ¶
BlockService is a block datastore. It uses an internal `datastore.Datastore` instance to store values.
func NewBlockService ¶
NewBlockService creates a BlockService with given datastore instance.
func (*BlockService) AddBlock ¶
AddBlock adds a particular block to the service, Putting it into the datastore.
func (*BlockService) DeleteBlock ¶
func (s *BlockService) DeleteBlock(k u.Key) error
DeleteBlock deletes a block in the blockservice from the datastore
Click to show internal directories.
Click to hide internal directories.