Documentation
¶
Overview ¶
Package codec owns the canonical, bounded golem.event.v1 transport envelope. It wraps one already validated immutable golem.fact.v1 or golem.fact.v2 row; it never reinterprets or rewrites the nested fact bytes.
Index ¶
- Constants
- type Envelope
- func (envelope Envelope) Action() golem.EventAction
- func (envelope Envelope) CausationID() golem.CausationID
- func (envelope Envelope) CodecIdentity() string
- func (envelope Envelope) Encoded() []byte
- func (envelope Envelope) EventID() golem.EventID
- func (envelope Envelope) EventSchemaDigest() (golem.EventSchemaDigest, bool)
- func (envelope Envelope) Fact() mutationfact.Envelope
- func (envelope Envelope) FormatVersion() uint16
- func (envelope Envelope) GenerationDigest() golem.SchemaDigest
- func (envelope Envelope) ModelID() golem.ModelID
- func (envelope Envelope) RecordedAt() time.Time
- func (envelope Envelope) ResolvedEventSchemaDigest() golem.EventSchemaDigest
- func (envelope Envelope) TransactionOrdinal() uint32
- type Error
- type Limits
Constants ¶
const ( FormatVersion uint16 = 1 CodecIdentity = "golem.event.v1" DefaultMaxEncodedBytes = 2 << 20 HardMaxEncodedBytes = 16 << 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
Envelope is one immutable validated transport event. Encoded returns an owned copy; Fact exposes the already schema-validated internal fact value to later internal P7 layers.
func Decode ¶
func Decode(encoded []byte, resolver mutationfact.HistoricalSchemaResolver, limits Limits) (Envelope, error)
func EncodeStoredRow ¶
func EncodeStoredRow(row mutationfact.OutboxRow, resolver mutationfact.HistoricalSchemaResolver, limits Limits) (Envelope, error)
EncodeStoredRow validates every duplicated immutable outbox column against its canonical nested fact before constructing golem.event.v1.
func (Envelope) Action ¶
func (envelope Envelope) Action() golem.EventAction
func (Envelope) CausationID ¶
func (envelope Envelope) CausationID() golem.CausationID
func (Envelope) CodecIdentity ¶
func (Envelope) EventSchemaDigest ¶
func (envelope Envelope) EventSchemaDigest() (golem.EventSchemaDigest, bool)
func (Envelope) Fact ¶
func (envelope Envelope) Fact() mutationfact.Envelope
func (Envelope) FormatVersion ¶
func (Envelope) GenerationDigest ¶
func (envelope Envelope) GenerationDigest() golem.SchemaDigest
func (Envelope) RecordedAt ¶
func (Envelope) ResolvedEventSchemaDigest ¶
func (envelope Envelope) ResolvedEventSchemaDigest() golem.EventSchemaDigest
ResolvedEventSchemaDigest is the logical event schema proven by the historical resolver. V1 does not carry this digest on wire, while V2 does; later typed delivery requires a non-zero value and compares it to the generated factory's schema.