package collector

import "github.com/google/monologue/collector"

Package collector fetches the data needed to monitor a single Certificate Transparency Log, which can then be used to check that it is adhering to RFC 6962.

Index

Functions

func Run

func Run(ctx context.Context, cfg *Config, cl *http.Client, st Storage) error

Run runs the collector on the Log specified in cfg, and stores the collected data in st. Run doesn't return unless an error occurs or ctx expires.

Types

type Config

type Config struct {
	// Details of the Log to collect data from.
	Log *ctlog.Log
	// How regularly the monitor should get an STH from the Log.
	// To disable getting STHs, set to 0.
	GetSTHPeriod time.Duration
	// How regularly the monitor should get root certificates from the Log.
	// To disable getting roots, set to 0.
	GetRootsPeriod time.Duration
	// How regularly the monitor should submit a (pre-)certificate to the Log.
	// To disable (pre-)certificate submission, set to 0.
	AddChainPeriod time.Duration
	// The CA that issues certificates for submission to the Log.  Must be set
	// if AddChainPeriod != 0.
	CA *certgen.CA
}

Config contains all of the configuration details for running the collector for a particular Log.

type Storage

Storage is an interface containing all of the storage methods required by Monologue. It will therefore satisfy every interface needed by the various modules that the collector runs (e.g. sthgetter, rootsgetter etc).

Source Files

collector.go

Directories

PathSynopsis
collector/datacollectorDatacollector runs a tool to collect the data needed to monitor Certificate Transparency Logs, which can then be used to check that they are adhering to RFC 6962.
Version
v0.0.0-20230315160450-1dc62842925e (latest)
Published
Mar 15, 2023
Platform
linux/amd64
Imports
14 packages
Last checked
2 weeks ago

Tools for package owners.