protopb

package
v0.3.0-20260824173604-... Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type HookEvent

type HookEvent struct {

	// id is the opaque identity of this occurrence, derived from the transition
	// it describes so that replaying the transition mints the same id. It is
	// the queue's dedupe key and a hook's idempotency key, and is never parsed.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// source is the domain that produced the event: "submitqueue",
	// "stovepipe", ... An open string rather than an enum so a new producer
	// does not break existing consumers.
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// type is what happened, as one dotted open string: "request.landed",
	// "batch.failed", ... It is the only dimension a consumer filters on, and
	// open for the same reason as source.
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// timestamp_ms is when the occurrence happened, in milliseconds since the
	// Unix epoch, on the publisher's clock.
	TimestampMs int64 `protobuf:"varint,4,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
	// version is the subject's optimistic-locking version immediately after the
	// transition, and 0 when the transition was not a versioned write. A hook
	// compares it against the subject's current version to tell a current event
	// from one that has since been superseded.
	Version int32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
	// payload carries the facts specific to type, always including the
	// subject's id, and must carry any fact recorded nowhere else because the
	// event is that fact's only durable record. Add-only, and never an entity
	// snapshot: hooks resolve entities from their stores.
	Payload *structpb.Struct `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

HookEvent is one fire-and-forget lifecycle event. Every domain publishes this same shape to its own hook topic, so a sink that consumes several domains reads one schema rather than one per producer. See api/base/hook/README.md.

func (*HookEvent) Descriptor deprecated

func (*HookEvent) Descriptor() ([]byte, []int)

Deprecated: Use HookEvent.ProtoReflect.Descriptor instead.

func (*HookEvent) GetId

func (x *HookEvent) GetId() string

func (*HookEvent) GetPayload

func (x *HookEvent) GetPayload() *structpb.Struct

func (*HookEvent) GetSource

func (x *HookEvent) GetSource() string

func (*HookEvent) GetTimestampMs

func (x *HookEvent) GetTimestampMs() int64

func (*HookEvent) GetType

func (x *HookEvent) GetType() string

func (*HookEvent) GetVersion

func (x *HookEvent) GetVersion() int32

func (*HookEvent) ProtoMessage

func (*HookEvent) ProtoMessage()

func (*HookEvent) ProtoReflect

func (x *HookEvent) ProtoReflect() protoreflect.Message

func (*HookEvent) Reset

func (x *HookEvent) Reset()

func (*HookEvent) String

func (x *HookEvent) String() string

Jump to

Keyboard shortcuts

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