hookevent

package
v0.3.0-20261016184532-... Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

View Source
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

func NewValidationRepositoryCancelled(request entity.Request) *basehook.HookEvent

NewValidationRepositoryCancelled builds the event announcing that request's validation ended without establishing a fact.

func NewValidationRepositoryRecorded

func NewValidationRepositoryRecorded(request entity.Request) *basehook.HookEvent

NewValidationRepositoryRecorded builds the event announcing that request's validation fact is durable.

func NewValidationRepositoryStarted

func NewValidationRepositoryStarted(request entity.Request) *basehook.HookEvent

NewValidationRepositoryStarted builds the event announcing that validation of request's commit has begun.

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"
)

Jump to

Keyboard shortcuts

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