Documentation
¶
Overview ¶
Package internal provide private utilities for the CLI application.
Index ¶
- Variables
- type Settings
- func (s *Settings) CORS() mwCors.Options
- func (s *Settings) Load(v *viper.Viper) error
- func (s *Settings) MetadataOptions() mwMetadata.Options
- func (s *Settings) OTEL(log xlog.Logger) []otelSdk.Option
- func (s *Settings) Overrides(cmd string) []cli.Param
- func (s *Settings) ReleaseCode() string
- func (s *Settings) ServerOptions(handler http.Handler, dir string, log xlog.Logger) []pkgHttp.Option
- func (s *Settings) SetDefaults(v *viper.Viper, appID string)
Constants ¶
This section is empty.
Variables ¶
var BuildCode string
BuildCode provides the commit identifier used to build the binary.
var BuildTimestamp string
BuildTimestamp provides the UNIX timestamp of the build.
var CoreVersion string
CoreVersion defines the semantic version of the build. If not available a short version of the commit hash will be used.
Functions ¶
This section is empty.
Types ¶
type Settings ¶
type Settings struct { Server *serverSettings `json:"server" yaml:"server" mapstructure:"server"` Otel *otelSettings `json:"otel" yaml:"otel" mapstructure:"otel"` }
Settings provide utilities to manage configuration options available when utilizing the different components available through the CLI application.
func (*Settings) MetadataOptions ¶
func (s *Settings) MetadataOptions() mwMetadata.Options
MetadataOptions return configuration settings required to adjust the behavior of the metadata middleware.
func (*Settings) OTEL ¶
OTEL returns the configuration options available to enable OpenTelemetry instrumentation.
func (*Settings) Overrides ¶
Overrides return the available flag overrides for the command specified. Specific settings can be provided via: configuration file, ENV variable and command flags.
func (*Settings) ReleaseCode ¶
ReleaseCode returns the release identifier for the application. A release identifier is of the form: `service-name@version+commit_hash`. If `version` or `commit_hash` are not available will be omitted.