Documentation
¶
Overview ¶
Package hookevent holds stovepipe's hook events: the source it reports, the types it publishes, and a constructor per type. Centralizing them keeps the wire contract in one place, so a controller names an event rather than assembling one.
Every payload carries identity only — the queue and the request id — and a hook resolves what it needs from storage. A richer payload would be a snapshot taken at publish time and read later, so it could describe state that has since moved on; identity cannot go stale. The cost is a store read per hook. See doc/rfc/stovepipe/steps/record.md.
Index ¶
Constants ¶
const Source = "stovepipe"
Source is reported on every hook event stovepipe publishes. A consumer serving several domains matches on it to recognize stovepipe's events.
Variables ¶
This section is empty.
Functions ¶
func NewValidationRepositoryCancelled ¶
NewValidationRepositoryCancelled builds the event announcing that request's validation ended without establishing a fact.
func NewValidationRepositoryRecorded ¶
NewValidationRepositoryRecorded builds the event announcing that request's validation fact is durable.
Types ¶
type Type ¶
type Type string
Type is the event type a consumer filters on.
const ( // TypeValidationRepositoryStarted announces that whole-repository validation // of the request named in the payload has begun. It carries no verdict; the // outcome arrives later as one of the types below. TypeValidationRepositoryStarted Type = "validation.repository.started" // TypeValidationRepositoryRecorded announces a durable whole-repository // validation fact for the request named in the payload. TypeValidationRepositoryRecorded Type = "validation.repository.recorded" // TypeValidationRepositoryCancelled announces a validation that ended // without establishing a fact, so a consumer can stop waiting on the commit. TypeValidationRepositoryCancelled Type = "validation.repository.cancelled" )