Documentation
¶
Index ¶
- func Initialize()
- func IsDevEnvironment() bool
- func IsShuttingDown() bool
- func KubernetesNamespace() (string, bool)
- func ModusHomeDir() string
- func ProductVersion() string
- func SetConfig(c *AppConfig)
- func SetOutputColorMode()
- func SetShuttingDown()
- func VersionNumber() string
- type AppConfig
- func (c *AppConfig) AppPath() string
- func (c *AppConfig) Environment() string
- func (c *AppConfig) IsDevEnvironment() bool
- func (c *AppConfig) KubernetesSecretName() string
- func (c *AppConfig) Port() int
- func (c *AppConfig) RefreshInterval() time.Duration
- func (c *AppConfig) S3Bucket() string
- func (c *AppConfig) S3Path() string
- func (c *AppConfig) UseAwsStorage() bool
- func (c *AppConfig) UseJsonLogging() bool
- func (c *AppConfig) UseKubernetesSecret() bool
- func (c *AppConfig) WithAppPath(appPath string) *AppConfig
- func (c *AppConfig) WithEnvironment(environment string) *AppConfig
- func (c *AppConfig) WithJsonLogging() *AppConfig
- func (c *AppConfig) WithPort(port int) *AppConfig
- func (c *AppConfig) WithRefreshInterval(interval time.Duration) *AppConfig
- func (c *AppConfig) WithS3Storage(s3Bucket, s3Path string) *AppConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶ added in v0.18.0
func Initialize()
func IsDevEnvironment ¶ added in v0.17.0
func IsDevEnvironment() bool
IsDevEnvironment returns true if the application is running in a development environment.
func IsShuttingDown ¶
func IsShuttingDown() bool
IsShuttingDown returns true if the application is in the process of a graceful shutdown.
func KubernetesNamespace ¶ added in v0.18.0
func ModusHomeDir ¶ added in v0.17.0
func ModusHomeDir() string
func ProductVersion ¶ added in v0.17.0
func ProductVersion() string
func SetConfig ¶ added in v0.17.0
func SetConfig(c *AppConfig)
SetConfig sets the global app configuration. This is typically only called in tests.
func SetOutputColorMode ¶ added in v0.17.0
func SetOutputColorMode()
SetOutputColorMode applies the FORCE_COLOR environment variable to override the default color mode.
func SetShuttingDown ¶
func SetShuttingDown()
SetShuttingDown sets the application to a shutting down state during a graceful shutdown.
func VersionNumber ¶ added in v0.17.0
func VersionNumber() string
Types ¶
type AppConfig ¶ added in v0.17.0
type AppConfig struct {
// contains filtered or unexported fields
}
func Config ¶ added in v0.17.0
func Config() *AppConfig
Config returns the global app configuration.
func CreateAppConfig ¶ added in v0.17.0
func CreateAppConfig() *AppConfig
Creates the app configuration from the command line flags and environment variables.
func NewAppConfig ¶ added in v0.17.0
func NewAppConfig() *AppConfig
Creates a new AppConfig instance with default values.
func (*AppConfig) Environment ¶ added in v0.17.0
func (*AppConfig) IsDevEnvironment ¶ added in v0.17.0
func (*AppConfig) KubernetesSecretName ¶ added in v0.18.0
func (*AppConfig) RefreshInterval ¶ added in v0.17.0
func (*AppConfig) UseAwsStorage ¶ added in v0.17.0
func (*AppConfig) UseJsonLogging ¶ added in v0.17.0
func (*AppConfig) UseKubernetesSecret ¶ added in v0.18.0
func (*AppConfig) WithAppPath ¶ added in v0.17.0
func (*AppConfig) WithEnvironment ¶ added in v0.17.0
func (*AppConfig) WithJsonLogging ¶ added in v0.17.0
func (*AppConfig) WithRefreshInterval ¶ added in v0.17.0
func (*AppConfig) WithS3Storage ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.