Documentation ¶
Index ¶
- func AsSha256(o interface{}) string
- func CalculateVirtualServicePrefix(version, subset string) string
- func CommonValueExists(l1, l2 []string) bool
- func EnvVarContains(envs []v1.EnvVar, env v1.EnvVar) bool
- func MKSubsetName(subset riskifiedv1alpha1.Subset) string
- func MatchNamespacedHost(hostname, namespace, matchedHost, inNamespace string) bool
- func MergeEnvVars(current []v1.EnvVar, overrides []v1.EnvVar) []v1.EnvVar
- func MkLogger(name string, keysAndValues ...interface{}) logr.Logger
- func MkResourceName(id types.NamespacedName) string
- func MkSubsetUniqueName(name, version string) string
- func RemoveItemFromStringSlice(s string, slc []string) []string
- func Shorten(msg string, length int) string
- func UniqueDynamicEnvName(id types.NamespacedName) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsSha256 ¶
func AsSha256(o interface{}) string
Generates (somewhat) unique hash of a struct (or anything else). Depends on the object's `String` method. Copied from blog post: https://blog.8bitzen.com/posts/22-08-2019-how-to-hash-a-struct-in-go
func CalculateVirtualServicePrefix ¶
Calculates the prefix for naming virtual service route name prefix. Note that empty subset produces more inclusive prefix (e.g., everything belongs to this single dynamicenv).
func CommonValueExists ¶
Validate intersection between two slices is not empty/
func MKSubsetName ¶ added in v0.2.0
func MKSubsetName(subset riskifiedv1alpha1.Subset) string
Just a convention to name subsets
func MatchNamespacedHost ¶
MatchNamespacedHost compares the provided `hostname` and `namespace` to the provided `matchHost`. If `matchHost` is *not* fully qualified, it uses the `inNamespace` parameter to match against the searched namespace.
func MkResourceName ¶ added in v0.2.0
func MkResourceName(id types.NamespacedName) string
func MkSubsetUniqueName ¶ added in v0.2.0
func UniqueDynamicEnvName ¶
func UniqueDynamicEnvName(id types.NamespacedName) string
Types ¶
This section is empty.