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.
Click to show internal directories.
Click to hide internal directories.