fossilizer

package
v0.0.1-dev Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package fossilizer defines types to implement a fossilizer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	// Returns arbitrary information about the adapter.
	GetInfo() (interface{}, error)

	// Adds a channel that receives results whenever data is fossilized.
	AddResultChan(resultChan chan *Result)

	// Requests data to be fossilized.
	// Meta is arbitrary data that will be sent to the result channels.
	Fossilize(data []byte, meta []byte) error
}

Adapter must be implemented by a fossilier.

type Result

type Result struct {
	// Evidence created by the fossilizer.
	Evidence interface{}

	// The data that was fossilized.
	Data []byte

	// The meta data that was given to Adapter.Fossilize.
	Meta []byte
}

Result is the type sent the the result channels.

Directories

Path Synopsis
Package fossilizerhttp is used to create an HTTP server from a fossilizer adapter.
Package fossilizerhttp is used to create an HTTP server from a fossilizer adapter.
Package fossilizertesting defines helpers to test fossilizers.
Package fossilizertesting defines helpers to test fossilizers.

Jump to

Keyboard shortcuts

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