Documentation ¶
Index ¶
- Variables
- func DefaultLogStreamInit(op *loglist3.Operator, log *loglist3.Log) (httpClient *http.Client)
- 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
- func (ls *LogStream) GetRawEntries(ctx context.Context, start, end int64, ...)
- func (ls *LogStream) MakeLogEntry(logindex int64, entry ct.LeafEntry) *LogEntry
- func (ls *LogStream) NewLastIndex(ctx context.Context) (lastIndex int64, err error)
- func (ls *LogStream) Run(ctx context.Context, entryCh chan<- *LogEntry)
- func (ls *LogStream) SendEntry(entryCh chan<- *LogEntry, logindex int64, entry ct.LeafEntry)
- func (ls *LogStream) Stopped() bool
- func (ls *LogStream) String() string
- type LogStreamInitFn
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var BatchSize = 1024
View Source
var DefaultHttpClient = &http.Client{ Timeout: 10 * time.Second, Transport: &http.Transport{ TLSHandshakeTimeout: 30 * time.Second, ResponseHeaderTimeout: 30 * time.Second, MaxConnsPerHost: 2, MaxIdleConnsPerHost: 2, DisableKeepAlives: false, ExpectContinueTimeout: 1 * time.Second, ForceAttemptHTTP2: true, }, }
Functions ¶
func DefaultLogStreamInit ¶
DefaultLogStreamInit returns DefaultHttpClient 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 Operators map[string]*LogOperator // operators by operator domain *bwlimit.Limiter // overall bandwidth limiter Logger }
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 Id int64 // database id, if available }
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 HttpClient *http.Client Err error // set if Stopped() returns true Count int64 // atomic: number of certificates sent to the channel MinIndex int64 // atomic: lowest index seen so far, -1 if none seen yet MaxIndex int64 // atomic: highest index seen so far, -1 if none seen yet LastIndex int64 // atomic: highest index that is available from stream source Id int32 // database ID, if available Backfilled int32 // atomic: nonzero if database backfill called for this stream // contains filtered or unexported fields }
func NewLogStream ¶
func (*LogStream) GetRawEntries ¶ added in v0.1.0
func (*LogStream) MakeLogEntry ¶ added in v0.1.0
func (*LogStream) NewLastIndex ¶ added in v0.1.0
type LogStreamInitFn ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.