sequencer

package
v0.0.0-...-9be813a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package sequencer reads mutations and applies them to the Trillian Map.

Index

Constants

View Source
const MaxBatchSize = int32(1000)

MaxBatchSize limits the number of mutations that will be processed per epoch.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForceNewEpoch

type ForceNewEpoch bool

ForceNewEpoch determines whether an epoch should be created, even if there are no mutation to process.

type Sequencer

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

Sequencer processes mutations and sends them to the trillian map.

func New

New creates a new instance of the signer.

func (*Sequencer) CreateEpoch

func (s *Sequencer) CreateEpoch(ctx context.Context, logID, mapID int64, forceNewEpoch ForceNewEpoch) error

CreateEpoch signs the current map head.

func (*Sequencer) Initialize

func (s *Sequencer) Initialize(ctx context.Context, logID, mapID int64) 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) StartSequencingAll

func (s *Sequencer) StartSequencingAll(ctx context.Context, refresh time.Duration) error

StartSequencingAll starts sequencing processes for all domains.

func (*Sequencer) StartSigning

func (s *Sequencer) StartSigning(ctx context.Context, logID, mapID int64, 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