pipeline

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(definitions ...*HttpMiddlewareDefinition) *Builder

func (*Builder) Add

func (instance *Builder) Add(definitions ...*HttpMiddlewareDefinition)

func (*Builder) Build

func (instance *Builder) Build(
	kernelInstance kernelcontract.Kernel,
	group string,
) ([]httpcontract.Middleware, *MiddlewareBuildReport, error)

func (*Builder) Describe added in v1.19.0

func (instance *Builder) Describe(
	environment string,
	group string,
) ([]MiddlewareDescription, *MiddlewareBuildReport, error)

Describe answers what Build would run WITHOUT running it: the same selection, gating and ordering — refused for the same cycles and missing references — but no factory is invoked, so describing a pipeline has no side effect in the process that asks.

type HttpMiddlewareDefinition

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

func NewHttpMiddlewareDefinition

func NewHttpMiddlewareDefinition(
	name string,
	priority int,
	before []string,
	after []string,
	groups []string,
	enabledEnvironments []string,
	factory HttpMiddlewareFactory,
	replaceExisting bool,
	allowDuplicates bool,
) *HttpMiddlewareDefinition

func (*HttpMiddlewareDefinition) SetFunctionName added in v1.19.0

func (instance *HttpMiddlewareDefinition) SetFunctionName(functionName string)

SetFunctionName records the function a description names for this definition — the registered middleware itself, or the factory that will build it — captured at registration precisely so that listing the pipeline never has to run it

type HttpMiddlewareFactory

type HttpMiddlewareFactory func(kernel kernelcontract.Kernel) (httpcontract.Middleware, error)

type InactiveMiddleware

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

func NewInactiveMiddleware

func NewInactiveMiddleware(name string, reason string) *InactiveMiddleware

func (*InactiveMiddleware) Name

func (instance *InactiveMiddleware) Name() string

func (*InactiveMiddleware) Reason

func (instance *InactiveMiddleware) Reason() string

type MiddlewareBuildReport

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

func NewMiddlewareBuildReport

func NewMiddlewareBuildReport(
	requestedGroup string,
	kernelEnv string,
	selectedNames []string,
	inactive []*InactiveMiddleware,
	missingReference []string,
	cycleDetected bool,
) *MiddlewareBuildReport

func (*MiddlewareBuildReport) CycleDetected

func (instance *MiddlewareBuildReport) CycleDetected() bool

func (*MiddlewareBuildReport) Inactive

func (instance *MiddlewareBuildReport) Inactive() []*InactiveMiddleware

func (*MiddlewareBuildReport) KernelEnv

func (instance *MiddlewareBuildReport) KernelEnv() string

func (*MiddlewareBuildReport) MissingReference

func (instance *MiddlewareBuildReport) MissingReference() []string

func (*MiddlewareBuildReport) RequestedGroup

func (instance *MiddlewareBuildReport) RequestedGroup() string

func (*MiddlewareBuildReport) SelectedNames

func (instance *MiddlewareBuildReport) SelectedNames() []string

func (*MiddlewareBuildReport) SetCycleDetected

func (instance *MiddlewareBuildReport) SetCycleDetected(cycleDetected bool)

func (*MiddlewareBuildReport) SetInactive

func (instance *MiddlewareBuildReport) SetInactive(inactive []*InactiveMiddleware)

SetInactive copies like every sibling accessor of this report: retaining the caller's slice was the one asymmetry, and a caller reusing its slice rewrote the stored report behind the getter's copy.

func (*MiddlewareBuildReport) SetMissingReference

func (instance *MiddlewareBuildReport) SetMissingReference(missingReference []string)

func (*MiddlewareBuildReport) SetSelectedNames

func (instance *MiddlewareBuildReport) SetSelectedNames(selectedNames []string)

type MiddlewareDescription added in v1.19.0

type MiddlewareDescription struct {
	Name         string
	Priority     int
	FunctionName string
}

MiddlewareDescription is one pipeline entry as the selection and the ordering see it, with no factory run: the definition name, the priority, and the function captured at registration — the middleware itself for a direct registration, the factory for a deferred one.

Jump to

Keyboard shortcuts

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