editionmerge

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package editionmerge converts edition.ServerInfo hooks into market.ServerDescriptor values and merges them into discovery results.

This package exists so both internal/cli (runtime catalog loader) and internal/app (command-tree loader) can apply the edition's SupplementServers / FallbackServers hooks consistently against the same discovery pipeline, instead of the hooks being wired only at the command-tree layer. Keeping the logic here avoids an import cycle between internal/cli ↔ internal/app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FallbackToDescriptors

func FallbackToDescriptors(servers []edition.ServerInfo) []market.ServerDescriptor

FallbackToDescriptors converts the edition's FallbackServers hook into market.ServerDescriptor values. Callers should only invoke this when live discovery returned zero servers and the cache is also empty.

func MergeSupplement

func MergeSupplement(servers []market.ServerDescriptor) []market.ServerDescriptor

MergeSupplement returns servers augmented with the active edition's SupplementServers hook. Discovery entries always win on ID collision — the supplement only fills gaps that discovery did not cover.

func ToDescriptor

func ToDescriptor(s edition.ServerInfo, source string) market.ServerDescriptor

ToDescriptor is the shared conversion from edition.ServerInfo to the market descriptor shape expected by downstream consumers.

Source carries the origin tag for diagnostics / metrics. Supplement and fallback entries intentionally carry no ToolOverrides — that keeps internal/compat.BuildDynamicCommands from materialising parallel command trees for products already owned by hardcoded overlays (see internal/compat/dynamic_commands.go's CLIOverlay gate).

Types

This section is empty.

Jump to

Keyboard shortcuts

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