Documentation ¶
Index ¶
- Constants
- Variables
- type CertPG
- func (cdb *CertPG) BackfillStream(ctx context.Context, ls *certstream.LogStream)
- func (cdb *CertPG) Close() error
- func (cdb *CertPG) Entry(ctx context.Context, le *certstream.LogEntry) (err error)
- func (cdb *CertPG) Estimate(table string) (estimate float64, err error)
- func (cdb *CertPG) LogError(err error, msg string, args ...any) error
- func (cdb *CertPG) Operator(ctx context.Context, lo *certstream.LogOperator) (err error)
- func (cdb *CertPG) ScanDnsname(rows *sql.Rows, dnsname *Dnsname) (err error)
- func (cdb *CertPG) Stream(ctx context.Context, ls *certstream.LogStream) (err error)
- type Dnsname
Constants ¶
View Source
const SelectDnsnameLike = `SELECT * FROM CERTDB_dnsnames WHERE dnsname LIKE $1;`
View Source
const SelectEstimate = `SELECT reltuples AS estimate FROM pg_class WHERE relname = $1;`
View Source
const SelectMaxIndex = `SELECT MAX(logindex) AS logindex FROM CERTDB_entry WHERE stream = $1;`
View Source
const SelectMinIndex = `SELECT MIN(logindex) AS logindex FROM CERTDB_entry WHERE stream = $1;`
Variables ¶
View Source
var BulkRange = int64(4096)
View Source
var FunctionName string
View Source
var FunctionOperatorID string
View Source
var FunctionStreamID string
View Source
var ProcedureCreateSchema string
View Source
var ProcedureNewEntry string
View Source
var SelectGaps string
Functions ¶
This section is empty.
Types ¶
type CertPG ¶
type CertPG struct { *sql.DB certstream.Logger Backfill bool // if true, fill in missing entries in database bwlimit.ContextDialer // if not nil, ContextDialer used for backfilling Pfx func(string) string // prefix replacer // contains filtered or unexported fields }
CertPG integrates with sql.DB to manage certificate stream data for a PostgreSQL database
func New ¶
func New(ctx context.Context, cd bwlimit.ContextDialer, db *sql.DB, prefix string) (cdb *CertPG, err error)
New creates a CertPG and creates the needed tables and indices if they don't exist.
func (*CertPG) BackfillStream ¶ added in v0.3.0
func (cdb *CertPG) BackfillStream(ctx context.Context, ls *certstream.LogStream)
func (*CertPG) Operator ¶
func (cdb *CertPG) Operator(ctx context.Context, lo *certstream.LogOperator) (err error)
func (*CertPG) ScanDnsname ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.