Documentation ¶
Index ¶
- Constants
- Variables
- func DB() *gorm.DB
- func ErrorHandler() emperror.Handler
- func Logger() common.Logger
- func LogrusLogger() *logrus.Logger
- func SetDB(d *gorm.DB)
- func SetErrorHandler(h emperror.Handler)
- func SetLogger(l common.Logger)
- func SetLogrusLogger(l *logrus.Logger)
- func SetVault(v *vault.Client)
- func SubscribeErrorHandler(s func(h emperror.Handler))
- func SubscribeLogger(s func(l common.Logger))
- func SubscribeLogrusLogger(s func(l *logrus.Logger))
- func Vault() *vault.Client
Constants ¶
const ( ManagedByPipelineTag = "banzaicloud-pipeline-managed" ManagedByPipelineValue = "true" ManagedByPipelineUUIDTag = "banzaicloud-pipeline-uuid" )
Variables ¶
var Config struct { Auth struct { Cookie struct { Secure bool SetDomain bool } OIDC struct { Issuer string } Token struct { Audience string Issuer string } } Cloud struct { Amazon struct { DefaultRegion string } } Cluster struct { Namespace string Autoscale struct { Namespace string Charts struct { ClusterAutoscaler struct { Chart string Version string ImageVersionConstraints []struct { K8sVersion string Repository string Tag string } } } } DisasterRecovery struct { Enabled bool Namespace string Ark struct { RestoreWaitTimeout time.Duration } Charts struct { Ark struct { Chart string Version string Values map[string]interface{} PluginImages struct { Aws struct { Repository string `chartConfig:"repository"` Tag string `chartConfig:"tag"` PullPolicy string `chartConfig:"pullPolicy"` } `chartConfig:"aws"` Azure struct { Repository string `chartConfig:"repository"` Tag string `chartConfig:"tag"` PullPolicy string `chartConfig:"pullPolicy"` } `chartConfig:"azure"` Gcp struct { Repository string `chartConfig:"repository"` Tag string `chartConfig:"tag"` PullPolicy string `chartConfig:"pullPolicy"` } `chartConfig:"gcp"` } } } } DNS struct { Enabled bool BaseDomain string ProviderSecret string } Labels struct { Namespace string } PostHook struct { Autoscaler struct { Enabled bool } Dashboard struct { Enabled bool Chart string Version string } Ingress struct { Enabled bool Chart string Version string Values map[string]interface{} } ITH struct { Enabled bool Chart string Version string } Spotconfig struct { Enabled bool Charts struct { Scheduler struct { Chart string Version string } Webhook struct { Chart string Version string } } } } } Dex struct { APIAddr string APICa string } Distribution struct { EKS struct { ExposeAdminKubeconfig bool TemplateLocation string SSH struct { Generate bool } } PKE struct { Amazon struct { DefaultNetworkProvider string } } } Kubernetes struct { Client struct { ForceGlobal bool } } Pipeline struct { External struct { URL string } UUID string Enterprise bool } Telemetry struct { Debug bool } }
Config is a global config instance. Deprecated: Use only if you must! Try not to extend with new values! nolint: gochecknoglobals
Functions ¶
func SetErrorHandler ¶
SetErrorHandler sets a global error handler.
Note: setting an error handler after the application bootstrap is not safe.
func SetLogger ¶
SetLogger sets a global error handler.
Note: setting an error handler after the application bootstrap is not safe.
func SetLogrusLogger ¶
SetLogrusLogger sets a global error handler.
Note: setting an error handler after the application bootstrap is not safe.
func SubscribeErrorHandler ¶
SubscribeErrorHandler subscribes a handler for global error handler changes.
func SubscribeLogger ¶
SubscribeLogger subscribes a handler for global error handler changes.
func SubscribeLogrusLogger ¶
SubscribeLogrusLogger subscribes a handler for global error handler changes.
Types ¶
This section is empty.