opsstate

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package opsstate persists trust-critical operation completion heartbeats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordSuccess

func RecordSuccess(
	ctx context.Context,
	db dbgen.DBTX,
	installationID int64,
	component string,
	operation string,
) error

RecordSuccess increments a durable success count and stamps it from the PostgreSQL clock. Callers that need the heartbeat atomic with their work pass it the transaction that commits that pass.

func RecordSuccessN

func RecordSuccessN(
	ctx context.Context,
	db dbgen.DBTX,
	installationID int64,
	component string,
	operation string,
	samples int64,
) error

RecordSuccessN records a completed pass and its bounded sample count.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL