Help us shape the future of Go! Take the 2026 Go Developer Survey

retriever

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package retriever contains logic for fetching or building MCP servers.

Index

Constants

View Source
const (
	// VerifyImageWarn prints a warning when image validation fails.
	VerifyImageWarn = "warn"
	// VerifyImageEnabled treats validation failure as a fatal error.
	VerifyImageEnabled = "enabled"
	// VerifyImageDisabled turns off validation.
	VerifyImageDisabled = "disabled"
)

Variables

View Source
var (
	// ErrBadProtocolScheme is returned when the provided serverOrImage is not a valid protocol scheme.
	ErrBadProtocolScheme = httperr.WithCode(
		errors.New("invalid protocol scheme provided for MCP server"),
		http.StatusBadRequest,
	)
	// ErrImageNotFound is returned when the specified image is not found in the registry.
	ErrImageNotFound = httperr.WithCode(
		errors.New("image not found in registry, please check the image name or tag"),
		http.StatusNotFound,
	)
	// ErrInvalidRunConfig is returned when the run configuration built by RunConfigBuilder is invalid
	ErrInvalidRunConfig = httperr.WithCode(
		errors.New("invalid run configuration provided"),
		http.StatusBadRequest,
	)
)

Functions

func GetMCPServer

func GetMCPServer(
	ctx context.Context,
	serverOrImage string,
	rawCACertPath string,
	verificationType string,
	groupName string,
	runtimeOverride *templates.RuntimeConfig,
) (string, types.ServerMetadata, error)

GetMCPServer retrieves the MCP server definition from the registry.

Types

type Retriever added in v0.3.0

Retriever is a function that retrieves the MCP server definition from the registry.

Jump to

Keyboard shortcuts

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