mcpserver

package
v1.19.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler is the loop.Handler[loops.EventMCPServer] for a single MCPServer name. All events for one name are dispatched to one Handler so Add/Delete pairs serialise in submission order even when distinct names run in parallel on their own loops.

func New

func New(opts Options) *Handler

New constructs a per-name MCPServer loop handler. The caller must invoke Run on the returned Handler's Loop().

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, e loops.EventMCPServer) error

Handle dispatches one event for this MCPServer name.

func (*Handler) Loop

Loop returns the underlying per-name loop.

type Options

type Options struct {
	Name                string
	CompStore           *compstore.ComponentStore
	Secret              SecretProcessor
	KubernetesMode      bool
	RegisterMCPServer   func(ctx context.Context, s mcpserverapi.MCPServer) error
	UnregisterMCPServer func(name string)
	// Root is the parent loop. The per-name loop posts MCPServerRegistered
	// back into it so root can update its in-flight counter.
	Root loop.Interface[loops.EventRoot]
}

Options configures a per-name MCPServer loop.

type SecretProcessor

type SecretProcessor interface {
	ProcessResource(ctx context.Context, r meta.Resource) (bool, string)
}

SecretProcessor resolves secret references on a resource. Same shape as the one used by the root loop; passed through so per-name loops don't pull in the secret package directly.

Jump to

Keyboard shortcuts

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