Documentation
¶
Index ¶
- func Difference(a, b []string) (diff []string)
- func IsLogLevelVerbose() bool
- func IsLogStructured() bool
- func MergeEnvLists(envLists ...[]corev1.EnvVar) []corev1.EnvVar
- func SSMapEqual(a, b map[string]string) bool
- func SSMapFilterByKeys(m map[string]string, keys []string) map[string]string
- func SSMapMerge(ms ...map[string]string) map[string]string
- func SandboxedTemplateSet() (*pongo2.TemplateSet, error)
- func WrapWithDeepestStack(err error, msg string) error
- type EnvConfig
- type SensitiveWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶ added in v0.2.0
Difference returns items that exist in b but not in a
func IsLogLevelVerbose ¶ added in v1.0.0
func IsLogLevelVerbose() bool
func IsLogStructured ¶ added in v1.0.0
func IsLogStructured() bool
func MergeEnvLists ¶ added in v0.12.0
func SSMapEqual ¶
SSMapEqual compares maps for equality
func SSMapFilterByKeys ¶ added in v0.4.0
SSMapFilterByKeys returns a new map that contains keys from the keys array existing in the m map.
func SSMapMerge ¶
SSMapMerge merges maps ms from left to right with overwriting existing keys
func SandboxedTemplateSet ¶ added in v1.2.0
func SandboxedTemplateSet() (*pongo2.TemplateSet, error)
SandboxedTemplateSet returns a pongo2 TemplateSet with file-access tags banned to prevent server-side template injection from user-controlled .spec.*.configuration fields.
func WrapWithDeepestStack ¶ added in v1.2.0
WrapWithDeepestStack preserves the full error message chain, but limits verbose logging to the deepest pkg/errors stack. This avoids the default github.com/pkg/errors behavior where %+v prints stack traces from all wraps.
Types ¶
type EnvConfig ¶ added in v1.3.0
type EnvConfig struct {
WatchNamespace string `envconfig:"WATCH_NAMESPACE" required:"true"`
OperatorNamespace *string `envconfig:"OPERATOR_NAMESPACE"`
LeaderElection *bool `envconfig:"PSO_LEADER_ELECTION_ENABLED"`
LeaderElectionID string `envconfig:"PSO_LEADER_ELECTION_LEASE_NAME"`
LeaseDuration time.Duration `envconfig:"PSO_LEADER_ELECTION_LEASE_DURATION" default:"60s"`
RenewDeadline time.Duration `envconfig:"PSO_LEADER_ELECTION_RENEW_DEADLINE" default:"40s"`
RetryPeriod time.Duration `envconfig:"PSO_LEADER_ELECTION_RETRY_PERIOD" default:"10s"`
Workers *int `envconfig:"MAX_CONCURRENT_RECONCILES"`
}
func GetEnvConfig ¶ added in v1.3.0
type SensitiveWriter ¶ added in v0.6.0
type SensitiveWriter struct {
// contains filtered or unexported fields
}
func NewSensitiveWriter ¶ added in v0.6.0
func NewSensitiveWriter(w io.Writer, r *regexp.Regexp) *SensitiveWriter