service

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckIn

type CheckIn struct {
	// contains filtered or unexported fields
}

CheckIn records incoming check-ins and owns API-side metrics.

func NewCheckIn

func NewCheckIn(checkInMonitor CheckInMonitor, registry MetricsRecorder) *CheckIn

NewCheckIn creates a check-in service.

func (*CheckIn) CheckInName

func (s *CheckIn) CheckInName() string

CheckInName returns the configured check-in monitor name.

func (*CheckIn) RecordCheckIn

func (s *CheckIn) RecordCheckIn(ctx context.Context, at time.Time) RecordCheckInResult

RecordCheckIn records a check-in and returns its new check-in monitor state.

func (*CheckIn) Snapshot

func (s *CheckIn) Snapshot() SnapshotResult

Snapshot returns the current check-in monitor snapshot.

type CheckInMonitor

type CheckInMonitor interface {
	CheckInName() string
	RecordCheckInContext(ctx context.Context, at time.Time) monitor.RecordResult
	Snapshot() monitor.Snapshot
}

CheckInMonitor exposes the check-in monitor behavior used by the check-in service.

type MetricsRecorder added in v0.0.11

type MetricsRecorder interface {
	IncCheckInReceived(checkIn string)
}

MetricsRecorder records check-in service metrics.

type RecordCheckInResult

type RecordCheckInResult struct {
	CheckInName   string
	Snapshot      monitor.Snapshot
	PreviousPhase monitor.Phase
}

RecordCheckInResult describes the outcome of recording a check-in.

type SnapshotResult

type SnapshotResult struct {
	CheckInName string
	Snapshot    monitor.Snapshot
}

SnapshotResult describes a check-in monitor snapshot.

Jump to

Keyboard shortcuts

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