sequencer

package
v0.0.0-...-1e3cd99 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sequencer

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

Sequencer processes mutations and sends them to the trillian map.

func New

func New(mapID int64,
	tmap trillian.TrillianMapClient,
	logID int64,
	tlog trillian.TrillianLogClient,
	mutator mutator.Mutator,
	mutations mutator.Mutation,
	factory transaction.Factory) *Sequencer

New creates a new instance of the signer.

func (*Sequencer) CreateEpoch

func (s *Sequencer) CreateEpoch(ctx context.Context, forceNewEpoch bool) error

CreateEpoch signs the current map head.

func (*Sequencer) Initialize

func (s *Sequencer) Initialize(ctx context.Context) error

Initialize inserts the object hash of an empty struct into the log if it is empty. This keeps the log leaves in-sync with the map which starts off with an empty log root at map revision 0.

func (*Sequencer) StartSigning

func (s *Sequencer) StartSigning(ctx context.Context, minInterval, maxInterval time.Duration)

StartSigning advance epochs once per minInterval, if there were mutations, and at least once per maxElapsed minIntervals.

Jump to

Keyboard shortcuts

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