Documentation
¶
Index ¶
- Constants
- func DefaultProfileDir(lookupEnv func(string) (string, bool)) (string, error)
- func EnvProxyConfigured(lookupEnv func(string) (string, bool)) bool
- func NormalizeControlPlaneURLPath(raw string) (string, error)
- func NormalizeExtraHeaders(source string, headers map[string]string) (map[string]string, error)
- func ProfilePath(name string, explicitDir string, lookupEnv func(string) (string, bool)) (string, string, error)
- func ProxyLogFields(proxyURL *url.URL, source ProxySource) []any
- func RedactProxyURL(proxyURL *url.URL) string
- func RegisterAdminFlags(fs *pflag.FlagSet)
- func RegisterFlags(fs *pflag.FlagSet)
- func ResolveControlPlanePath(baseURL *url.URL, urlPath, routePath string) *url.URL
- func ResolveProfileDir(explicitDir string, lookupEnv func(string) (string, bool)) (string, error)
- func ValidateControlPlaneAPIKey(key string) error
- func ValidateProfileBytes(path string, data []byte) error
- func ValidateProfileFile(path string) error
- func ValidateProfileName(name string) error
- func ValidateTunnelID(tunnelID string) error
- func WriteUsage(fs *pflag.FlagSet, w io.Writer)
- type AdminConfig
- type AdminUIConfig
- type CloudflaredConfig
- type Config
- type ConfigSource
- type ControlPlaneConfig
- type HarpoonConfig
- type HarpoonHostClassifierConfig
- type HarpoonTarget
- type HarpoonTransportKind
- type HealthConfig
- type LogFormat
- type LoggingConfig
- type MCPChannelBinding
- type MCPConfig
- type MCPTransportKind
- type ProcessConfig
- type ProxyHealthConfig
- type ProxySource
- type RuntimeConfig
Constants ¶
const ( LogFormatUnset = runtimeconfig.LogFormatUnset LogFormatStructText = runtimeconfig.LogFormatStructText LogFormatJSON = runtimeconfig.LogFormatJSON )
const ( MCPTransportHTTPStreamable = runtimeconfig.MCPTransportHTTPStreamable MCPTransportStdio = runtimeconfig.MCPTransportStdio MCPTransportInMemory = runtimeconfig.MCPTransportInMemory )
const ( HarpoonTransportHTTPStreamable = runtimeconfig.HarpoonTransportHTTPStreamable DefaultHarpoonMaxResponseBytes = runtimeconfig.DefaultHarpoonMaxResponseBytes DefaultHarpoonMaxRedirects = runtimeconfig.DefaultHarpoonMaxRedirects )
const ( ProxySourceNone = runtimeconfig.ProxySourceNone ProxySourceEnvironment = runtimeconfig.ProxySourceEnvironment ProxySourceIgnored = runtimeconfig.ProxySourceIgnored )
const ( ProfileEnvName = runtimeconfig.ProfileEnvName ProfileFileEnvName = runtimeconfig.ProfileFileEnvName ProfileDirEnvName = runtimeconfig.ProfileDirEnvName ConfigEnvName = runtimeconfig.ConfigEnvName )
Variables ¶
This section is empty.
Functions ¶
func DefaultProfileDir ¶
func NormalizeExtraHeaders ¶ added in v0.0.11
func ProfilePath ¶
func ProxyLogFields ¶
func ProxyLogFields(proxyURL *url.URL, source ProxySource) []any
func RedactProxyURL ¶
func RegisterAdminFlags ¶
RegisterAdminFlags attaches admin/tunnel-management flags to the provided flag set.
func RegisterFlags ¶
RegisterFlags delegates every shared flag to runtimeconfig and adds only full-client extensions.
func ResolveControlPlanePath ¶
func ResolveProfileDir ¶
func ValidateControlPlaneAPIKey ¶ added in v0.0.11
func ValidateProfileBytes ¶
func ValidateProfileFile ¶
func ValidateProfileName ¶
func ValidateTunnelID ¶
Types ¶
type AdminConfig ¶
type AdminConfig struct {
BaseURL *url.URL
URLPath string
AdminKey string
OrganizationIDs []string
WorkspaceIDs []string
TLS *tlsconfig.Bundle
}
AdminConfig captures the options required for tunnel management API calls.
The admin CLI surface is intentionally narrower than the runtime client configuration: it only needs a base URL, an admin API key, and the scoped organization/workspace headers required by the control plane.
func LoadAdminConfig ¶
func LoadAdminConfig(fs *pflag.FlagSet, lookupEnv func(string) (string, bool)) (*AdminConfig, error)
LoadAdminConfig builds an AdminConfig from the provided flag set and environment.
It enforces that an admin API key is present and that at least one of organization_id or workspace_id is supplied to scope the request context.
type AdminUIConfig ¶
AdminUIConfig contains full-client-only UI settings.
type CloudflaredConfig ¶ added in v0.0.11
type CloudflaredConfig = runtimeconfig.CloudflaredSettings
type Config ¶
type Config struct {
ControlPlane ControlPlaneConfig
Logging LoggingConfig
Health HealthConfig
Process ProcessConfig
Cloudflared CloudflaredConfig
MCP MCPConfig
AdminUI AdminUIConfig
Harpoon HarpoonConfig
ProxyHealth ProxyHealthConfig
TLS *tlsconfig.Bundle
Runtime RuntimeConfig
}
Config is the full-client superset. Shared runtime fields stay source compatible here, but their values are loaded exactly once by runtimeconfig. The one explicit adapter below is covered by parity tests.
func Load ¶
Load builds the full-client superset from the canonical runtime loader plus the small set of full-only extension settings.
func LoadFromFlagSet ¶
LoadFromFlagSet loads shared production behavior once in runtimeconfig, then applies the full-client-only extension values against the same effective flag > environment > profile > default lookup.
type ConfigSource ¶
type ConfigSource = runtimeconfig.ConfigSource
Profile selection and validation are shared production behavior. Keep this package as a source-compatible forwarding surface for full-client callers.
func ResolveConfigSource ¶
type ControlPlaneConfig ¶
type ControlPlaneConfig = runtimeconfig.ControlPlaneConfig
type HarpoonConfig ¶
type HarpoonConfig struct {
AllowPlaintextHTTP bool
MaxResponseBytes int
MaxRedirects int
AdditionalTransports []HarpoonTransportKind
Targets []HarpoonTarget
CapturePayloads bool
HostClassifier HarpoonHostClassifierConfig
HTTPProxy *url.URL
HTTPProxySource ProxySource
}
HarpoonConfig keeps the full-client-only payload-capture switch alongside runtime-owned shared Harpoon settings for source compatibility.
func (HarpoonConfig) AdditionalTransportEnabled ¶
func (h HarpoonConfig) AdditionalTransportEnabled(kind HarpoonTransportKind) bool
type HarpoonHostClassifierConfig ¶
type HarpoonHostClassifierConfig = runtimeconfig.HarpoonHostClassifierConfig
type HarpoonTarget ¶
type HarpoonTarget = runtimeconfig.HarpoonTarget
type HarpoonTransportKind ¶
type HarpoonTransportKind = runtimeconfig.HarpoonTransportKind
type HealthConfig ¶
type HealthConfig = runtimeconfig.HealthConfig
type LogFormat ¶
type LogFormat = runtimeconfig.LogFormat
Shared production types are owned by runtimeconfig. These aliases preserve the historical pkg/config API for full-client callers.
func ParseLogFormat ¶
type LoggingConfig ¶
type LoggingConfig = runtimeconfig.LoggingConfig
type MCPChannelBinding ¶
type MCPChannelBinding = runtimeconfig.MCPChannelBinding
type MCPConfig ¶
type MCPConfig = runtimeconfig.MCPConfig
type MCPTransportKind ¶
type MCPTransportKind = runtimeconfig.MCPTransportKind
type ProcessConfig ¶
type ProcessConfig = runtimeconfig.ProcessConfig
type ProxyHealthConfig ¶
ProxyHealthConfig contains the full-client-only proxy connectivity probe.
type ProxySource ¶
type ProxySource = runtimeconfig.ProxySource
type RuntimeConfig ¶
type RuntimeConfig = runtimeconfig.RuntimeConfig