Documentation
¶
Index ¶
- Variables
- type HookEvent
- func (*HookEvent) Descriptor() ([]byte, []int)deprecated
- func (x *HookEvent) GetId() string
- func (x *HookEvent) GetPayload() *structpb.Struct
- func (x *HookEvent) GetSource() string
- func (x *HookEvent) GetTimestampMs() int64
- func (x *HookEvent) GetType() string
- func (x *HookEvent) GetVersion() int32
- func (*HookEvent) ProtoMessage()
- func (x *HookEvent) ProtoReflect() protoreflect.Message
- func (x *HookEvent) Reset()
- func (x *HookEvent) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_hook_proto protoreflect.FileDescriptor
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) GetPayload ¶
func (*HookEvent) GetTimestampMs ¶
func (*HookEvent) GetVersion ¶
func (*HookEvent) ProtoMessage ¶
func (*HookEvent) ProtoMessage()
func (*HookEvent) ProtoReflect ¶
func (x *HookEvent) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.