Documentation
¶
Index ¶
- Variables
- type AtomicSequence
- type SystemClock
- type UUIDv7Generator
- func (generator *UUIDv7Generator) NewAttemptID(now time.Time) (domain.AttemptID, error)
- func (generator *UUIDv7Generator) NewExecutionInvocationID(now time.Time) (string, error)
- func (generator *UUIDv7Generator) NewRequestID(now time.Time) (string, error)
- func (generator *UUIDv7Generator) NewReviewID(now time.Time) (domain.ReviewID, error)
- func (generator *UUIDv7Generator) NewRoleTaskID(now time.Time) (string, error)
- func (generator *UUIDv7Generator) NewRunID(now time.Time) (domain.RunID, error)
- func (generator *UUIDv7Generator) NewSessionID(now time.Time) (domain.SessionID, error)
- func (generator *UUIDv7Generator) NewSourceInvocationID(now time.Time) (string, error)
Constants ¶
This section is empty.
Variables ¶
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 (*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 (*UUIDv7Generator) NewRoleTaskID ¶
func (generator *UUIDv7Generator) NewRoleTaskID(now time.Time) (string, error)
NewRoleTaskID creates a role task identifier.
func (*UUIDv7Generator) NewSessionID ¶
func (*UUIDv7Generator) NewSourceInvocationID ¶
func (generator *UUIDv7Generator) NewSourceInvocationID(now time.Time) (string, error)
NewSourceInvocationID creates a source invocation identifier.