Documentation
¶
Overview ¶
Package log includes code that is specific to Trillian's log mode, particularly code for running sequencing operations.
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 instances are responsible for integrating new leaves into a single log. Leaves will be assigned unique sequence numbers when they are processed. There is no strong ordering guarantee but in general entries will be processed in order of submission to the log.
func NewSequencer ¶
func NewSequencer(hasher merkle.TreeHasher, timeSource util.TimeSource, logStorage storage.LogStorage, signer *crypto.Signer) *Sequencer
NewSequencer creates a new Sequencer instance for the specified inputs.
func (Sequencer) SequenceBatch ¶
SequenceBatch wraps up all the operations needed to take a batch of queued leaves and integrate them into the tree. TODO(Martin2112): Can possibly improve by deferring a function that attempts to rollback, which will fail if the tx was committed. Should only do this if we can hide the details of the underlying storage transactions and it doesn't create other problems.
func (*Sequencer) SetGuardWindow ¶
SetGuardWindow changes the interval that must elapse between leaves being queued and them being eligible for sequencing. The default is a zero interval.