Documentation
¶
Index ¶
- Constants
- func DurationMillis(d time.Duration) int64
- func ErrorObject(err any) map[string]any
- func NewRunID(prefix string, now time.Time) string
- func SubjectHash(kind string, key string) string
- type AuditStatusCounts
- type Config
- type DailyArrival
- type Detail
- type Event
- func AuditRunCompletedEvent(profile, status string, duration time.Duration, counts AuditStatusCounts) Event
- func SQLiteArchiveAttemptEvent() Event
- func SQLiteArchiveCompletedEvent(duration time.Duration, snapshotBytes int64, archiveBytes int64) Event
- func SQLiteArchiveFailedEvent(duration time.Duration, code SQLiteArchiveFailureCode) Event
- func SQLiteArchiveIntervalSkippedEvent(remaining time.Duration) Event
- func SQLiteArchiveLockSkippedEvent() Event
- func SQLiteArchiveOverlapSkippedEvent() Event
- func SQLiteArchiveStartedEvent() Event
- type ImportRecord
- type Marker
- type Reader
- type RunContext
- type RunRecord
- type SQLiteArchiveFailureCode
- type Sink
- type StageRecord
- type Window
Constants ¶
View Source
const ( DefaultReaderMaxLineBytes = 1 << 20 DefaultReaderMaxBytes = 64 << 20 DefaultReaderMaxEvents = 100_000 )
View Source
const SchemaVersion = "dbrain.metrics.v1"
Variables ¶
This section is empty.
Functions ¶
func DurationMillis ¶
func ErrorObject ¶
func SubjectHash ¶
Types ¶
type AuditStatusCounts ¶ added in v0.7.0
type AuditStatusCounts struct {
Pass, Warn, Fail, Unknown, Skipped int
}
type DailyArrival ¶ added in v0.7.0
type Event ¶
func AuditRunCompletedEvent ¶ added in v0.7.0
func AuditRunCompletedEvent(profile, status string, duration time.Duration, counts AuditStatusCounts) Event
func SQLiteArchiveAttemptEvent ¶ added in v0.7.0
func SQLiteArchiveAttemptEvent() Event
func SQLiteArchiveCompletedEvent ¶ added in v0.7.0
func SQLiteArchiveFailedEvent ¶ added in v0.7.0
func SQLiteArchiveFailedEvent(duration time.Duration, code SQLiteArchiveFailureCode) Event
func SQLiteArchiveIntervalSkippedEvent ¶ added in v0.7.0
func SQLiteArchiveLockSkippedEvent ¶ added in v0.7.0
func SQLiteArchiveLockSkippedEvent() Event
func SQLiteArchiveOverlapSkippedEvent ¶ added in v0.7.0
func SQLiteArchiveOverlapSkippedEvent() Event
func SQLiteArchiveStartedEvent ¶ added in v0.7.0
func SQLiteArchiveStartedEvent() Event
type ImportRecord ¶ added in v0.7.0
type RunContext ¶
func (RunContext) Detail ¶
func (ctx RunContext) Detail() Detail
func (RunContext) Emit ¶
func (ctx RunContext) Emit(event Event) error
func (RunContext) Enabled ¶
func (ctx RunContext) Enabled() bool
func (RunContext) IncludeSubjectKeys ¶
func (ctx RunContext) IncludeSubjectKeys() bool
type SQLiteArchiveFailureCode ¶ added in v0.7.0
type SQLiteArchiveFailureCode string
const ( SQLiteArchiveFailureArchive SQLiteArchiveFailureCode = "archive_failed" SQLiteArchiveFailureCanceled SQLiteArchiveFailureCode = "canceled" SQLiteArchiveFailureLock SQLiteArchiveFailureCode = "lock_failed" SQLiteArchiveFailureState SQLiteArchiveFailureCode = "state_failed" SQLiteArchiveFailureTimeout SQLiteArchiveFailureCode = "timeout" )
type Sink ¶
type StageRecord ¶ added in v0.7.0
type Window ¶ added in v0.7.0
type Window struct {
CoverageStart time.Time
CoverageEnd time.Time
Runs []RunRecord
Imports map[string]ImportRecord
Markers []Marker
DurationSamples []time.Duration
ParseErrorCount int
ParseErrorPositions []int64
BytesRead int64
EventsRead int
ByteBudgetExhausted bool
EventBudgetExhausted bool
AttemptCount int
CompletedCount int
LatestAttemptPresent bool
LatestCompletedPresent bool
}
Click to show internal directories.
Click to hide internal directories.