Documentation ¶
Overview ¶
Package monitor provides monitoring of Certificate Transparency logs. If running in continuous mode, the list of logs can be updated dynamically.
Implement the Matcher interface to customize which certificates should be included in the monitor's emitted events. See MatchAll for an example.
Note that this package verifies that the monitored logs are locally consistent with regard to the initial start-up state. It is up to the user to process the monitor's emitted events and errors, and to persist state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Optional Matcher Matcher // Which log entries to match (default is to match all) Logger *logger.Logger // Debug prints only (no output by default) Contact string // Something that help log operators get in touch ChunkSize uint // Min number of leaves to propagate a chunk without matches BatchSize uint // Max number of certificates to accept per worker NumWorkers uint // Number of parallel workers to use for each log }
type Event ¶
Event carries the latest consistent monitor state, found matches, as well as errors that occurred while trying to match on the downloaded log entries.
type LogEntry ¶
type LogEntry struct { LeafIndex uint64 `json:"leaf_index"` LeafData []byte `json:"leaf_data"` ExtraData []byte `json:"extra_data"` }
LogEntry is a Merkle tree leaf in a log
type MatchAll ¶
type MatchAll struct{}
type Matcher ¶
type MonitoredLog ¶
MonitoredLog provides information about a log the monitor is following
type State ¶
type State struct { ct.SignedTreeHead `json:"latest_sth"` CompactRange [][sha256.Size]byte `json:"compact_range"` NextIndex uint64 `json:"next_index"` }
State is the latest append-only state the monitor observed from its local vantage point. The compact range covers [0, NextIndex). The next entry to download from the log is at index NextIndex.