dummyfossilizer

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package dummyfossilizer implements a fossilizer that can be used for testing.

It doesn't do much -- it just adds a timestamp.

Index

Constants

View Source
const (
	// Description is the description set in the fossilizer's information.
	Description = "Stratumn's Dummy Fossilizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// A version string that will be set in the store's information.
	Version string

	// A git commit hash that will be set in the store's information.
	Commit string
}

Config contains configuration options for the store.

type DummyFossilizer

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

DummyFossilizer is the type that implements github.com/stratumn/go-core/fossilizer.Adapter.

func New

func New(config *Config) *DummyFossilizer

New creates an instance of a DummyFossilizer.

func (*DummyFossilizer) AddFossilizerEventChan added in v0.2.0

func (a *DummyFossilizer) AddFossilizerEventChan(fossilizerEventChan chan *fossilizer.Event)

AddFossilizerEventChan implements github.com/stratumn/go-core/fossilizer.Adapter.AddFossilizerEventChan.

func (*DummyFossilizer) Fossilize

func (a *DummyFossilizer) Fossilize(ctx context.Context, data []byte, meta []byte) error

Fossilize implements github.com/stratumn/go-core/fossilizer.Adapter.Fossilize.

func (*DummyFossilizer) GetInfo

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

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

func (*DummyFossilizer) ListenersCount added in v0.3.1

func (a *DummyFossilizer) ListenersCount() int

ListenersCount returns the number of registered listeners.

type Info

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

Info is the info returned by GetInfo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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