config

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	// Check validates the configuration and returns an error if the configuration is invalid.
	Check() error
}

Config is an interface that defines a method for checking configuration validity.

type MoLingConfig

type MoLingConfig struct {
	ConfigFile string `json:"config_file"` // The path to the configuration file.
	BasePath   string `json:"base_path"`   // The base path for the server, used for storing files. automatically created if not exists. eg: /Users/user1/.moling
	//AllowDir   []string `json:"allow_dir"`   // The directories that are allowed to be accessed by the server.
	Version    string `json:"version"`     // The version of the MoLing server.
	ListenAddr string `json:"listen_addr"` // The address to listen on for SSE mode.
	Debug      bool   `json:"debug"`       // Debug mode, if true, the server will run in debug mode.
	Module     string `json:"module"`      // The module to load, default: all
	Username   string // The username of the user running the server.
	HomeDir    string // The home directory of the user running the server. macOS: /Users/user1, Linux: /home/user1
	SystemInfo string // The system information of the user running the server. macOS: Darwin 15.3.3, Linux: Ubuntu 20.04.1 LTS

	// for MCP Server Config
	Description string // Description of the MCP Server, default: CliDescription
	Command     string //	Command to start the MCP Server, STDIO mode only,  default: CliName
	Args        string // Arguments to pass to the command, STDIO mode only, default: empty
	BaseURL     string // BaseURL , SSE mode only.
	ServerName  string // ServerName MCP ServerName, add to the MCP Client config
	AuthToken   string // AuthToken for SSE mode authentication. Auto-generated if empty.
	// contains filtered or unexported fields
}

MoLingConfig is a struct that holds the configuration for the MoLing server.

func (*MoLingConfig) Check

func (cfg *MoLingConfig) Check() error

func (*MoLingConfig) Logger

func (cfg *MoLingConfig) Logger() zerolog.Logger

func (*MoLingConfig) SetLogger

func (cfg *MoLingConfig) SetLogger(logger zerolog.Logger)

Jump to

Keyboard shortcuts

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