conf

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvLocal = "local"
	EnvProd  = "prod"
)

Variables

This section is empty.

Functions

func CheckEnv added in v1.0.4

func CheckEnv(Env string) bool

Types

type App added in v1.0.4

type App struct {
	Env             string `yaml:"Env"`
	Log             string `yaml:"Log"`
	DenyPrivateIP   bool   `yaml:"DenyPrivateIP"`
	SamplingSeconds int    `yaml:"SamplingSeconds"`
	DeltaSeconds    int    `yaml:"DeltaSeconds"`
	TraceSeconds    int    `yaml:"TraceSeconds"`
}

type Bs added in v1.0.4

type Bs struct {
	Server  *Server        `yaml:"Server"`
	Data    *Data          `yaml:"Data"`
	App     *App           `yaml:"App"`
	Plugins *PluginsConfig `yaml:"Plugins"`
	Mcp     *Mcp           `yaml:"Mcp"`
}

func Load added in v1.0.4

func Load(env string, flagPort, flagEnv, flagDir, flagPprofPort, flagLog string) (bs Bs, err error)

type Data added in v1.0.4

type Data struct {
	StorageDir string `yaml:"StorageDir"`
}

type Mcp added in v1.0.18

type Mcp struct {
	// APIBase is the full Prof HTTP root used by MCP tools (no trailing slash).
	// If empty, defaults to http://127.0.0.1:{Server.Port}.
	APIBase string `yaml:"APIBase"`
}

Mcp configures the stdio MCP subprocess (`prof … mcp`).

type PluginsConfig added in v1.0.16

type PluginsConfig struct {
	I18nZh       bool `yaml:"i18n_zh"`
	SourceFold   bool `yaml:"source_fold"`
	PeekFold     bool `yaml:"peek_fold"`
	GraphExplain bool `yaml:"graph_explain"`
}

type Server added in v1.0.4

type Server struct {
	Port  string `yaml:"Port"`
	Port2 string `yaml:"Port2"`
}

Jump to

Keyboard shortcuts

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