package core
import "github.com/google/certificate-transparency-go/trillian/migrillian/core"
Package core provides transport-agnostic implementation of Migrillian tool.
Index ¶
- func WithSignalCancel(ctx context.Context) (context.Context, context.CancelFunc)
- type Controller
- func NewController(opts Options, ctClient *client.LogClient, plClient *PreorderedLogClient) *Controller
- func (c *Controller) Run(ctx context.Context) error
- type Options
- type PreorderedLogClient
Functions ¶
func WithSignalCancel ¶
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.
Source Files ¶
controller.go trillian.go util.go
- Version
- v1.0.18
- Published
- May 22, 2018
- Platform
- linux/amd64
- Imports
- 20 packages
- Last checked
- 1 hour ago –
Tools for package owners.