bcbatchfossilizer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package bcbatchfossilizer implements a fossilizer that fossilize batches of hashes on a blockchain.

Index

Constants

View Source
const (
	// Name is the name set in the fossilizer's information.
	Name = "bcbatch"

	// Description is the description set in the fossilizer's information.
	Description = "Indigo's Blockchain Batch Fossilizer"
)

Variables

This section is empty.

Functions

func RegisterFlags added in v0.3.0

func RegisterFlags()

RegisterFlags registers the flags used by RunWithFlags.

Types

type Config

type Config struct {
	HashTimestamper blockchain.HashTimestamper
}

Config contains configuration options for the fossilizer.

type Fossilizer

type Fossilizer struct {
	*batchfossilizer.Fossilizer
	// contains filtered or unexported fields
}

Fossilizer is the type that implements github.com/stratumn/go-indigocore/fossilizer.Adapter.

func New

func New(config *Config, batchConfig *batchfossilizer.Config) (*Fossilizer, error)

New creates an instance of a Fossilizer.

func RunWithFlags added in v0.3.0

func RunWithFlags(ctx context.Context, version, commit string, hashTS blockchain.HashTimestamper) *Fossilizer

RunWithFlags should be called after RegisterFlags and flag.Parse to initialize a bcbatchfossilizer using flag values.

func (*Fossilizer) GetInfo

func (a *Fossilizer) GetInfo(ctx context.Context) (interface{}, error)

GetInfo implements github.com/stratumn/go-indigocore/fossilizer.Adapter.GetInfo.

type Info

type Info struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Version     string `json:"version"`
	Commit      string `json:"commit"`
	Blockchain  string `json:"blockchain"`
}

Info is the info returned by GetInfo.

Jump to

Keyboard shortcuts

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