monitor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAllSTHs

func FetchAllSTHs()

func FetchEndpointUptimes

func FetchEndpointUptimes()

func Get4xxBackoff

func Get4xxBackoff(submissionURL string) (time.Duration, string, int)

func Get5xxBackoff

func Get5xxBackoff(submissionURL string) (time.Duration, string, int)

func GetAvgResponseTime

func GetAvgResponseTime(submissionURL string) (time.Duration, bool)

GetAvgResponseTime returns the average response time over the last 30s for a log.

func GetBadResponseBackoff

func GetBadResponseBackoff(submissionURL string) (time.Duration, string)

func GetEndpointUptime24h

func GetEndpointUptime24h(submissionURL, endpoint string) (float64, bool)

func GetEndpointUptime90d

func GetEndpointUptime90d(submissionURL, endpoint string) (float64, bool)

func GetRecentOutcomeCounts

func GetRecentOutcomeCounts(submissionURL string) (successes, failures int)

GetRecentOutcomeCounts returns the number of successful and failed responses in the last 30s.

func GetSlowResponseBackoff

func GetSlowResponseBackoff(submissionURL string) (time.Duration, string)

func GetTimeoutBackoff

func GetTimeoutBackoff(submissionURL string) (time.Duration, string)

func Record4xxResponse

func Record4xxResponse(submissionURL string, httpResponse *http.Response) bool

func Record5xxResponse

func Record5xxResponse(submissionURL string, httpResponse *http.Response) bool

func RecordBadResponse

func RecordBadResponse(submissionURL string) bool

func RecordSlowResponse

func RecordSlowResponse(submissionURL string) bool

func RecordSubmissionOutcome

func RecordSubmissionOutcome(submissionURL string, outcome string)

RecordSubmissionOutcome increments the Prometheus counter for a submission outcome.

func RecordSubmissionResponseTime

func RecordSubmissionResponseTime(submissionURL string, d time.Duration)

RecordSubmissionResponseTime observes a response time for the given log.

func RecordTimeout

func RecordTimeout(submissionURL string) bool

func STHMonitor

func STHMonitor(ctx context.Context)

func UptimeFetcher

func UptimeFetcher(ctx context.Context)

Types

type EndpointUptimes

type EndpointUptimes struct {
	Lowest            float64
	AddChain          float64
	AddPreChain       float64
	GetEntries        float64
	GetProofByHash    float64
	GetRoots          float64
	GetSTH            float64
	GetSTHConsistency float64
	Checkpoint        float64
	Tile              float64
}

type STHData

type STHData struct {
	IsRFC6962Log  bool
	SubmissionURL string
	KeyName       string
	SigVerifier   *ctgo.SignatureVerifier
	NoteVerifiers note.Verifiers
	TreeSize      uint64
	Timestamp     *time.Time
	LastFetched   *time.Time
}

func GetSTHData

func GetSTHData(logURL string) (*STHData, bool)

Jump to

Keyboard shortcuts

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