submitnoop

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultHookOrder = 100

DefaultHookOrder is the default submit hook ordering for submit-noop.

View Source
const ID = "submit-noop"

ID is the reserved plugin identifier for the no-op submit hook feature.

Variables

This section is empty.

Functions

func NewLifecycleProbeForConfig

func NewLifecycleProbeForConfig() lipplugin.Lifecycle

NewLifecycleProbeForConfig returns the overlap-safe lifecycle probe for submit-noop when lifecycle_probe is enabled.

func NewSubmitHook

func NewSubmitHook() sdk.SubmitHook

NewSubmitHook returns the registered submit hook entrypoint with default ordering.

func NewSubmitHookWithConfig

func NewSubmitHookWithConfig(cfg HookConfig) sdk.SubmitHook

NewSubmitHookWithConfig returns the registered submit hook entrypoint using decoded feature config.

func SetLifecycleProbeFactoryForTest

func SetLifecycleProbeFactoryForTest(fn func() lipplugin.Lifecycle)

SetLifecycleProbeFactoryForTest overrides probe construction used when lifecycle_probe is true. Tests may return a shared instance so bootstrap merge + CompileGeneration overlay double-registration is observable. Pass nil to restore the default per-merge instance.

Types

type HookConfig

type HookConfig struct {
	// Order overrides hook sort order (default DefaultHookOrder).
	Order *int `yaml:"order"`
	// LifecycleProbe, when true, registers a no-op Lifecycle for bootstrap integration tests.
	LifecycleProbe bool `yaml:"lifecycle_probe"`
}

HookConfig is decoded from the feature plugin YAML config for submit-noop.

func DecodeHookConfig

func DecodeHookConfig(n yaml.Node) (HookConfig, error)

DecodeHookConfig parses and validates submit-noop YAML. Empty or null config is allowed.

type LifecycleProbe

type LifecycleProbe struct {
	// contains filtered or unexported fields
}

LifecycleProbe is an optional no-op lifecycle returned when HookConfig.LifecycleProbe is true. It is explicitly safe under candidate overlap (generation-local, no process globals).

func (*LifecycleProbe) SafeUnderCandidateOverlap

func (l *LifecycleProbe) SafeUnderCandidateOverlap() bool

SafeUnderCandidateOverlap reports that Start/Stop may overlap across generations.

func (*LifecycleProbe) Start

func (l *LifecycleProbe) Start(context.Context) error

func (*LifecycleProbe) StartCount

func (l *LifecycleProbe) StartCount() int

StartCount returns how many times Start has been invoked on this instance.

func (*LifecycleProbe) Stop

func (*LifecycleProbe) StopCount

func (l *LifecycleProbe) StopCount() int

StopCount returns how many times Stop has been invoked on this instance.

func (*LifecycleProbe) WasStarted

func (l *LifecycleProbe) WasStarted() bool

WasStarted reports whether Start has completed successfully.

func (*LifecycleProbe) WasStopped

func (l *LifecycleProbe) WasStopped() bool

WasStopped reports whether Stop has completed successfully.

Jump to

Keyboard shortcuts

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