discovery

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package discovery defines the workload discovery contract vMCP uses to find backend workloads in both CLI and Kubernetes environments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRuntimeDiscovererFactory added in v0.77.0

func RegisterRuntimeDiscovererFactory(factory RuntimeDiscovererFactory)

RegisterRuntimeDiscovererFactory sets the factory NewRuntimeDiscoverer uses. pkg/vmcp/discovery/environment registers it from init.

Types

type Discoverer added in v0.77.0

type Discoverer interface {
	// ListWorkloadsInGroup returns all workloads that belong to the specified group
	ListWorkloadsInGroup(ctx context.Context, groupName string) ([]TypedWorkload, error)

	// GetWorkloadAsVMCPBackend retrieves workload details and converts it to a vmcp.Backend.
	// The returned Backend should have all fields populated except AuthConfig,
	// which will be set by the discoverer based on the auth configuration.
	// Returns nil if the workload exists but is not accessible (e.g., no URL).
	GetWorkloadAsVMCPBackend(ctx context.Context, workload TypedWorkload) (*vmcp.Backend, error)
}

Discoverer is the interface for workload managers used by vmcp. This interface contains only the methods needed for backend discovery, allowing both CLI and Kubernetes managers to implement it.

func NewRuntimeDiscoverer added in v0.77.0

func NewRuntimeDiscoverer(ctx context.Context) (Discoverer, error)

NewRuntimeDiscoverer creates the Discoverer for the current runtime environment through the registered factory.

type RuntimeDiscovererFactory added in v0.77.0

type RuntimeDiscovererFactory func(ctx context.Context) (Discoverer, error)

RuntimeDiscovererFactory creates the Discoverer for the current runtime environment.

type TypedWorkload added in v0.77.0

type TypedWorkload struct {
	// Name is the name of the workload
	Name string
	// Type is the type of the workload (MCPServer or MCPRemoteProxy)
	Type WorkloadType
}

TypedWorkload contains information about a discovered workload

type WorkloadType added in v0.77.0

type WorkloadType string

WorkloadType represents the type of workload

const (
	// WorkloadTypeMCPServer represents an MCPServer workload
	WorkloadTypeMCPServer WorkloadType = "MCPServer"
	// WorkloadTypeMCPRemoteProxy represents an MCPRemoteProxy workload
	WorkloadTypeMCPRemoteProxy WorkloadType = "MCPRemoteProxy"
	// WorkloadTypeMCPServerEntry represents an MCPServerEntry workload (zero-infrastructure catalog entry)
	WorkloadTypeMCPServerEntry WorkloadType = "MCPServerEntry"
)

Directories

Path Synopsis
Package environment registers the discovery.Discoverer that matches the runtime environment: Kubernetes workloads or the local workload manager.
Package environment registers the discovery.Discoverer that matches the runtime environment: Kubernetes workloads or the local workload manager.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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