featurebundle

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEnabledFeatureBundles

func BuildEnabledFeatureBundles(reg FeatureBundleRegistry, registrations []lipsdk.Registration) ([]lipfeature.FeatureBundle, error)

BuildEnabledFeatureBundles builds FeatureBundles from enabled feature registrations in order.

func ContributeBundle

func ContributeBundle(cs *lipfeature.ContributionSet, pluginID string, b lipfeature.FeatureBundle) error

ContributeBundle contributes all planes from FeatureBundle b into the given ContributionSet using the provided pluginID via b.PlaneSet.ReplayTo. It validates the bundle schema before replay. If b.PlaneSet is zero, it is a no-op after schema validation.

func ContributeHost

func ContributeHost(cs *lipfeature.ContributionSet, host HostContributions) error

ContributeHost contributes host-level observer contributions into the given ContributionSet with SourceHost semantics.

func FreezeBundle

func FreezeBundle(b lipfeature.FeatureBundle, pluginID string) (lipfeature.FrozenPlaneSet, error)

FreezeBundle converts a single FeatureBundle into a FrozenPlaneSet with pluginID.

Types

type FeatureBundleRegistry

type FeatureBundleRegistry interface {
	BuildFeatureBundle(factoryKey string, n yaml.Node) (lipfeature.FeatureBundle, error)
}

FeatureBundleRegistry represents any registry or catalog capable of building FeatureBundles.

type GeneratedMergeSurface

type GeneratedMergeSurface struct {
	Frozen     lipfeature.FrozenPlaneSet
	Lifecycles []lipplugin.Lifecycle
	// contains filtered or unexported fields
}

GeneratedMergeSurface represents the composed result of feature contributions merged through generated typed plane adapters. It holds an immutable FrozenPlaneSet containing all declared plane values, and a separate Lifecycles slice side-channel (lifecycles are not an extension plane).

func MergeBundlesGenerated

func MergeBundlesGenerated(bundles ...lipfeature.FeatureBundle) (GeneratedMergeSurface, error)

MergeBundlesGenerated merges one or more FeatureBundles through generated plane adapters in registration order, returning a GeneratedMergeSurface containing the frozen plane set and separate lifecycles. If any contribution fails validation or conflicts, the candidate is discarded and an empty GeneratedMergeSurface and error are returned.

func MergeFeatureSurfaceGenerated

func MergeFeatureSurfaceGenerated(reg FeatureBundleRegistry, registrations []lipsdk.Registration) (GeneratedMergeSurface, error)

MergeFeatureSurfaceGenerated merges enabled feature plugins into a GeneratedMergeSurface. It builds bundles from enabled feature registrations in order and merges them through generated plane adapters.

func MergeFeatureSurfacesWithHost

func MergeFeatureSurfacesWithHost(reg FeatureBundleRegistry, registrations []lipsdk.Registration, host HostContributions, extraFeatureBundles ...lipfeature.FeatureBundle) (GeneratedMergeSurface, error)

MergeFeatureSurfacesWithHost merges enabled feature plugins, host contributions, and optional candidate feature bundles into a GeneratedMergeSurface. Feature bundles are contributed under SourceFeature (plugins first, candidate extras last), and host observer contributions are contributed under SourceHost between initial feature plugins and candidate extras.

func (GeneratedMergeSurface) BindAttemptTransforms

func (g GeneratedMergeSurface) BindAttemptTransforms(contributorID string, transforms []request.AttemptTransform) (GeneratedMergeSurface, error)

BindAttemptTransforms replaces attempt transforms contributed by contributorID in this GeneratedMergeSurface under SourceGenerationBinder semantics (CombReplaceByIdentity). If validation or combination fails, the candidate is left unmodified and an error is returned.

func (GeneratedMergeSurface) BindCompactionPreservers

func (g GeneratedMergeSurface) BindCompactionPreservers(contributorID string, preservers []compaction.Preserver) (GeneratedMergeSurface, error)

BindCompactionPreservers replaces compaction preservers contributed by contributorID in this GeneratedMergeSurface under SourceGenerationBinder semantics (CombReplaceByIdentity). If validation or combination fails, the candidate is left unmodified and an error is returned.

func (GeneratedMergeSurface) BindStreamObserverFactories

func (g GeneratedMergeSurface) BindStreamObserverFactories(contributorID string, factories []response.StreamObserverFactory) (GeneratedMergeSurface, error)

BindStreamObserverFactories replaces stream observer factories contributed by contributorID in this GeneratedMergeSurface under SourceGenerationBinder semantics (CombReplaceByIdentity). If validation or combination fails, the candidate is left unmodified and an error is returned.

func (GeneratedMergeSurface) MergeCandidatePlanes

MergeCandidatePlanes merges candidate feature planes under SourceFeature into the surface. If candidate planes are zero/empty, the surface is returned unmodified. If validation or combination fails, the surface is left unmodified and an error is returned.

type HostContributions

type HostContributions struct {
	TrafficObservers []traffic.Observer
	UsageObservers   []usage.Observer
}

HostContributions holds host-provided contributions (process options) that can be merged alongside feature plugin contributions. Host contributions are merged under SourceHost and are strictly limited to planes that permit host contributions (TrafficObservers, UsageObservers).

Jump to

Keyboard shortcuts

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