core

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package core provides transport-agnostic implementation of Migrillian tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSignalCancel

func WithSignalCancel(ctx context.Context) (context.Context, context.CancelFunc)

WithSignalCancel acts like context.WithCancel(), but it also automatically invokes cancel if a termination signal (SIGINT/SIGTERM) is received by the process.

Types

type Controller

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

Controller coordinates migration from a CT log to a Trillian tree.

TODO(pavelkalinnikov): - Add per-tree master election. - Coordinate multiple trees. - Schedule a distributed fetch to increase throughput. - Store CT STHs in Trillian or make this tool stateful on its own. - Make fetching stateful to reduce master resigning aftermath.

func NewController

func NewController(opts Options, ctClient *client.LogClient, plClient *PreorderedLogClient) *Controller

NewController creates a Controller configured by the passed in options.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

Run transfers CT log entries obtained via the CT log client to a Trillian log via the other client. If Options.Continuous is true then the migration process runs continuously trying to keep up with the target CT log.

type Options

type Options struct {
	scanner.FetcherOptions
	Submitters          int
	BatchesPerSubmitter int
}

Options holds configuration for a Controller.

type PreorderedLogClient

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

PreorderedLogClient is a means of communicating with a single Trillian pre-ordered log tree.

func NewPreorderedLogClient

func NewPreorderedLogClient(
	cli trillian.TrillianLogClient, tree *trillian.Tree, prefix string,
) (*PreorderedLogClient, error)

NewPreorderedLogClient creates and initializes a pre-ordered log client.

Jump to

Keyboard shortcuts

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