config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Type     string `yaml:"type"`
	TokenEnv string `yaml:"token_env,omitempty"`
	Header   string `yaml:"header,omitempty"`
}

Auth describes how to authenticate requests to an upstream.

type RelayConfig

type RelayConfig struct {
	Listen      string               `yaml:"listen"`
	RulesDir    string               `yaml:"rules_dir"`
	ProfilesDir string               `yaml:"profiles_dir,omitempty"`
	PacksDir    string               `yaml:"packs_dir,omitempty"`
	Routes      []Route              `yaml:"routes"`
	Log         keepconfig.LogConfig `yaml:"log,omitempty"`
}

RelayConfig holds the top-level relay configuration.

func Load

func Load(path string) (*RelayConfig, error)

Load reads and validates a relay config from a YAML file.

type Route

type Route struct {
	Scope    string   `yaml:"scope"`
	Upstream string   `yaml:"upstream,omitempty"`
	Command  string   `yaml:"command,omitempty"`
	Args     []string `yaml:"args,omitempty"`
	Auth     *Auth    `yaml:"auth,omitempty"`
}

Route maps a scope to an upstream MCP endpoint with optional auth. Exactly one of Upstream or Command must be set.

Jump to

Keyboard shortcuts

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