blocksutil

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 2 Imported by: 0

README

go-ipfs-blocksutil

standard-readme compliant GoDoc Build Status

go-ipfs-blocksutil provides provides utility functions for working with Blocks.

Lead Maintainer

Steven Allen

Table of Contents

Install

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

> go get github.com/fgeth/fg-ipfs-blocksutil

Usage

import "github.com/fgeth/fg-ipfs-blocksutil"

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.

Documentation

Overview

Package blocksutil provides utility functions for working with Blocks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockGenerator

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

BlockGenerator generates BasicBlocks on demand. For each instace of BlockGenerator, each new block is different from the previous, although two different instances will produce the same.

func NewBlockGenerator

func NewBlockGenerator() BlockGenerator

NewBlockGenerator returns an object capable of producing blocks.

func (*BlockGenerator) Blocks

func (bg *BlockGenerator) Blocks(n int) []blocks.Block

Blocks generates as many BasicBlocks as specified by n.

func (*BlockGenerator) Next

func (bg *BlockGenerator) Next() *blocks.BasicBlock

Next generates a new BasicBlock.

Jump to

Keyboard shortcuts

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