gateway

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

type Capabilities struct {
	Tools             []server.ServerTool
	Prompts           []server.ServerPrompt
	Resources         []server.ServerResource
	ResourceTemplates []ServerResourceTemplate
}

func (*Capabilities) PromptNames

func (c *Capabilities) PromptNames() []string

func (*Capabilities) ToolNames

func (c *Capabilities) ToolNames() []string

type Config

type Config struct {
	Options
	ServerNames  []string
	CatalogPath  string
	ConfigPath   string
	RegistryPath string
	SecretsPath  string
}

type Configuration

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

func (*Configuration) DockerImages

func (c *Configuration) DockerImages() []string

func (*Configuration) Find

func (c *Configuration) Find(serverName string) (*ServerConfig, *map[string]catalog.Tool, bool)

func (*Configuration) ServerNames

func (c *Configuration) ServerNames() []string

type Configurator

type Configurator interface {
	Read(ctx context.Context) (Configuration, chan Configuration, func() error, error)
}

type FileBasedConfiguration

type FileBasedConfiguration struct {
	CatalogPath  string
	ServerNames  []string // Takes precedence over the RegistryPath
	RegistryPath string
	ConfigPath   string
	SecretsPath  string // Optional, if not set, use Docker Desktop's secrets API
	Watch        bool
	// contains filtered or unexported fields
}

func (*FileBasedConfiguration) Read

type Gateway

type Gateway struct {
	Options
	// contains filtered or unexported fields
}

func NewGateway

func NewGateway(config Config, docker docker.Client) *Gateway

func (*Gateway) Run

func (g *Gateway) Run(ctx context.Context) error

type Options

type Options struct {
	Port             int
	Transport        string
	ToolNames        []string
	Interceptors     []string
	Verbose          bool
	LongLived        bool
	DebugDNS         bool
	LogCalls         bool
	BlockSecrets     bool
	BlockNetwork     bool
	VerifySignatures bool
	DryRun           bool
	Watch            bool
	Cpus             int
	Memory           string
	Static           bool
}

type ServerConfig

type ServerConfig struct {
	Name    string
	Spec    catalog.Server
	Config  map[string]any
	Secrets map[string]string
}

type ServerResourceTemplate

type ServerResourceTemplate struct {
	ResourceTemplate mcp.ResourceTemplate
	Handler          server.ResourceTemplateHandlerFunc
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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