Help us shape the future of Go! Take the 2026 Go Developer Survey

shared

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerConfigFile

type LoggerConfigFile struct {
	Level string `mapstructure:"level" json:"level,omitempty" default:"warn"`

	// format can be "json" or "console"
	Format string `mapstructure:"format" json:"format,omitempty" default:"console"`
}

type ObservabilityConfigFile added in v0.82.0

type ObservabilityConfigFile struct {
	// Enabled controls whether the OTel collector gRPC service and REST API trace endpoints are active.
	Enabled bool `mapstructure:"enabled" json:"enabled,omitempty" default:"false"`

	// MaxBatchSize is the maximum number of spans accepted per Export RPC call. Excess spans are rejected
	// via OTLP PartialSuccess, signaling SDK exporters to back off.
	MaxBatchSize int `mapstructure:"maxBatchSize" json:"maxBatchSize,omitempty" default:"1000"`
}

ObservabilityConfigFile configures the worker->engine OTel collector (the engine acting as a gRPC TraceService that receives spans from SDK workers). This is separate from OpenTelemetryConfigFile which configures the engine's own outbound tracing.

type OpenTelemetryConfigFile

type OpenTelemetryConfigFile struct {
	CollectorURL   string `mapstructure:"collectorURL" json:"collectorURL,omitempty"`
	ServiceName    string `mapstructure:"serviceName" json:"serviceName,omitempty" default:"server"`
	TraceIdRatio   string `mapstructure:"traceIdRatio" json:"traceIdRatio,omitempty" default:"1"`
	Insecure       bool   `mapstructure:"insecure" json:"insecure,omitempty" default:"false"`
	CollectorAuth  string `mapstructure:"collectorAuth" json:"collectorAuth,omitempty"`
	MetricsEnabled bool   `mapstructure:"metricsEnabled" json:"metricsEnabled,omitempty" default:"false"`
}

type PrometheusConfigFile

type PrometheusConfigFile struct {
	// PrometheusServerURL is the URL of the prometheus server
	PrometheusServerURL string `mapstructure:"prometheusServerURL" json:"prometheusServerURL,omitempty" default:""`

	// PrometheusServerUsername is the username for the prometheus server that supports basic auth
	PrometheusServerUsername string `mapstructure:"prometheusServerUsername" json:"prometheusServerUsername,omitempty" default:""`

	// PrometheusServerPassword is the password for the prometheus server that supports basic auth
	PrometheusServerPassword string `mapstructure:"prometheusServerPassword" json:"prometheusServerPassword,omitempty" default:""`

	// Address is the metrics endpoint address
	Address string `mapstructure:"address" json:"address,omitempty" default:":9090"`

	// Enabled is a boolean that enables or disables the prometheus server
	Enabled bool `mapstructure:"enabled" json:"enabled,omitempty" default:"false"`

	// Path is the path to bind the prometheus server to
	Path string `mapstructure:"path" json:"path,omitempty" default:"/metrics"`

	// TenantScoped gates the per-tenant Prometheus metrics endpoint on the
	// tenant's prometheus_metrics entitlement. When false (default), metrics are
	// served for all tenants (legacy/self-hosted behavior).
	TenantScoped bool `mapstructure:"tenantScoped" json:"tenantScoped,omitempty" default:"false"`
}

type TLSConfigFile

type TLSConfigFile struct {
	// TLSStrategy can be "tls", "mtls", or "none"
	TLSStrategy string `mapstructure:"tlsStrategy" json:"tlsStrategy,omitempty" default:"tls"`

	TLSCert       string `mapstructure:"tlsCert" json:"tlsCert,omitempty"`
	TLSCertFile   string `mapstructure:"tlsCertFile" json:"tlsCertFile,omitempty"`
	TLSKey        string `mapstructure:"tlsKey" json:"tlsKey,omitempty"`
	TLSKeyFile    string `mapstructure:"tlsKeyFile" json:"tlsKeyFile,omitempty"`
	TLSRootCA     string `mapstructure:"tlsRootCA" json:"tlsRootCA,omitempty"`
	TLSRootCAFile string `mapstructure:"tlsRootCAFile" json:"tlsRootCAFile,omitempty"`

	// TLSMinVersion sets the minimum TLS version ("1.2" or "1.3"). Defaults to TLS 1.3.
	TLSMinVersion string `mapstructure:"tlsMinVersion" json:"tlsMinVersion,omitempty"`
}

Jump to

Keyboard shortcuts

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