Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFlags ¶
ApplyFlags overrides config fields with explicitly-set CLI flags. Only flags the user actually passed on the command line are applied.
func LoadOrCreateToken ¶
LoadOrCreateToken ensures cfg.MCPToken is set. It migrates from the legacy mcp-token file if present, otherwise generates a new 32-byte hex token. The config is saved after the token is set.
Types ¶
type Config ¶
type Config struct {
ProxyPort int `json:"proxy_port"`
MCPEnabled bool `json:"mcp_enabled"`
MCPAddr string `json:"mcp_addr"`
MCPToken string `json:"mcp_token"`
BufferSize int `json:"buffer_size"`
ThrottlePreset string `json:"throttle_preset"`
ListMode string `json:"list_mode"`
TreeGroupBy string `json:"tree_group_by"`
ProtoPaths []string `json:"proto_paths,omitempty"`
ProtoIncludes []string `json:"proto_includes,omitempty"`
ProtoHosts map[string]ProtoHostConfig `json:"proto_hosts,omitempty"`
}
Config holds persistent httpmon settings stored in ~/.httpmon/config.json.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with sensible defaults.
type ProtoHostConfig ¶ added in v0.1.13
type ProtoHostConfig struct {
Paths []string `json:"paths"`
Includes []string `json:"includes,omitempty"`
}
ProtoHostConfig maps a host pattern to its own set of .proto files.
Click to show internal directories.
Click to hide internal directories.