Documentation
¶
Index ¶
- Constants
- func NewLifecycleProbeForConfig() lipplugin.Lifecycle
- func NewSubmitHook() sdk.SubmitHook
- func NewSubmitHookWithConfig(cfg HookConfig) sdk.SubmitHook
- func SetLifecycleProbeFactoryForTest(fn func() lipplugin.Lifecycle)
- type HookConfig
- type LifecycleProbe
- func (l *LifecycleProbe) SafeUnderCandidateOverlap() bool
- func (l *LifecycleProbe) Start(context.Context) error
- func (l *LifecycleProbe) StartCount() int
- func (l *LifecycleProbe) Stop(context.Context) error
- func (l *LifecycleProbe) StopCount() int
- func (l *LifecycleProbe) WasStarted() bool
- func (l *LifecycleProbe) WasStopped() bool
Constants ¶
const DefaultHookOrder = 100
DefaultHookOrder is the default submit hook ordering for submit-noop.
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 ¶
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 ¶
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) StartCount ¶
func (l *LifecycleProbe) StartCount() int
StartCount returns how many times Start has been invoked on this instance.
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.