Help us shape the future of Go! Take the 2026 Go Developer Survey

runtime

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClockRegression = errors.New("UUIDv7 clock regression")

ErrClockRegression reports a timestamp older than one already consumed.

Functions

This section is empty.

Types

type AtomicSequence

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

AtomicSequence supplies exact process-local program order and fails closed on uint64 exhaustion.

func (*AtomicSequence) Next

func (sequence *AtomicSequence) Next() (uint64, error)

type SystemClock

type SystemClock struct{}

SystemClock provides the process wall clock through the application clock port.

func (SystemClock) Now

func (SystemClock) Now() time.Time

type UUIDv7Generator

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

UUIDv7Generator creates canonical identifiers from an injected timestamp and cryptographically random entropy. It rejects a timestamp older than any prior call so callers cannot silently hide wall-clock regression.

func NewUUIDv7Generator

func NewUUIDv7Generator() *UUIDv7Generator

func (*UUIDv7Generator) NewAttemptID

func (generator *UUIDv7Generator) NewAttemptID(now time.Time) (domain.AttemptID, error)

func (*UUIDv7Generator) NewExecutionInvocationID

func (generator *UUIDv7Generator) NewExecutionInvocationID(now time.Time) (string, error)

NewExecutionInvocationID creates an unprefixed execution invocation identifier.

func (*UUIDv7Generator) NewRequestID

func (generator *UUIDv7Generator) NewRequestID(now time.Time) (string, error)

NewRequestID creates the command-envelope request identifier.

func (*UUIDv7Generator) NewReviewID

func (generator *UUIDv7Generator) NewReviewID(now time.Time) (domain.ReviewID, error)

func (*UUIDv7Generator) NewRoleTaskID

func (generator *UUIDv7Generator) NewRoleTaskID(now time.Time) (string, error)

NewRoleTaskID creates a role task identifier.

func (*UUIDv7Generator) NewRunID

func (generator *UUIDv7Generator) NewRunID(now time.Time) (domain.RunID, error)

func (*UUIDv7Generator) NewSessionID

func (generator *UUIDv7Generator) NewSessionID(now time.Time) (domain.SessionID, error)

func (*UUIDv7Generator) NewSourceInvocationID

func (generator *UUIDv7Generator) NewSourceInvocationID(now time.Time) (string, error)

NewSourceInvocationID creates a source invocation identifier.

Jump to

Keyboard shortcuts

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