Documentation
¶
Overview ¶
Package app has the static app info
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = defaultVersion
Version needs to be set at build time using -ldflags "-X github.com/getoutreach/gobox/pkg/app.Version=something"
Functions ¶
Types ¶
type Data ¶
type Data struct {
Name string
Version string
MainModule string
Environment string
Namespace string
ServiceAccount string
ClusterName string
Region string
PodID string
NodeID string
Deployment string
// ServiceID is a unique identifier for the service used primarily
// within the `authn` framework.
ServiceID string
Bento string
// contains filtered or unexported fields
}
Data provides the global app info
func Info ¶
func Info() *Data
Info returns the static app info
This struct is used mainly to provide tags to append to logs. It's also used by a handful of infrastructure-y packages like Mint or orgservice that have special needs. Most services will never need to access it directly.
func (*Data) LogValue ¶ added in v1.88.0
LogValue implements the log/slog package's LogValuer interface (found here: https://pkg.go.dev/log/slog#LogValuer). Returns a subset of the App.Info data as a map.
func (*Data) MarshalLog ¶
MarshalLog marshals the struct for logging
Click to show internal directories.
Click to hide internal directories.