Documentation ¶
Index ¶
- Variables
- func DefaultLogStreamInit(op *loglist3.Operator, log *loglist3.Log) (httpClient *http.Client, startIndex int64)
- func GetLogList(ctx context.Context, httpClient *http.Client, listUrl string) (logList *loglist3.LogList, err error)
- func OperatorDomain(urlString string) string
- type CertStream
- type LogEntry
- type LogOperator
- type LogStream
- type LogStreamInitFn
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHttpClient = &http.Client{ Timeout: 10 * time.Second, Transport: &http.Transport{ TLSHandshakeTimeout: 30 * time.Second, ResponseHeaderTimeout: 30 * time.Second, MaxIdleConnsPerHost: 10, DisableKeepAlives: false, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, ExpectContinueTimeout: 1 * time.Second, }, }
Functions ¶
func DefaultLogStreamInit ¶
func DefaultLogStreamInit(op *loglist3.Operator, log *loglist3.Log) (httpClient *http.Client, startIndex int64)
DefaultLogStreamInit returns (DefaultHttpClient, -1) for all operators and logs where the log is usable.
func GetLogList ¶
func GetLogList(ctx context.Context, httpClient *http.Client, listUrl string) (logList *loglist3.LogList, err error)
GetLogList fetches a CT log list from the given listUrl. Usually you would pass loglist3.AllLogListURL for the listUrl.
func OperatorDomain ¶
OperatorDomain returns the TLD+1 given an URL.
Types ¶
type CertStream ¶
type CertStream struct { LogStreamInit LogStreamInitFn BatchSize int ParallelFetch int Operators map[string]*LogOperator // operators by operator domain }
func (*CertStream) CountStreams ¶ added in v0.0.3
func (cs *CertStream) CountStreams() (running, stopped int)
type LogEntry ¶
type LogEntry struct { *LogStream Err error // error from RawLogEntryFromLeaf or ToLogEntry, or nil RawLogEntry *ct.RawLogEntry // may be nil in case of error *ct.LogEntry // may be nil in case of error }
func (*LogEntry) Cert ¶
func (le *LogEntry) Cert() (cert *x509.Certificate)
Cert returns the cert from LogEntry.X509Cert or LogEntry.Precert.TBSCertificate, or nil.
type LogOperator ¶ added in v0.0.3
type LogStream ¶
type LogStream struct { *LogOperator *loglist3.Log *client.LogClient Err error // set if Stopped() returns true Count int64 // atomic; number of certificates sent to the channel Index int64 // atomic; highest index sent to the channel EndIndex int64 // atomic: highest index that was available on startup // contains filtered or unexported fields }
func NewLogStream ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.