Documentation
¶
Index ¶
- Constants
- func InitializeControllerLogger(ctx context.Context, name string) (logging.Logger, context.Context)
- func IsNil(i any) bool
- func K8sNameHash(ids ...string) string
- func PrefixWithNamespace(sourceNamespace, name string) string
- func ScopeToControlPlane(cpMeta *metav1.ObjectMeta, ids ...string) string
Constants ¶
const (
Base32EncodeStdLowerCase = "abcdefghijklmnopqrstuvwxyz234567"
)
Variables ¶
This section is empty.
Functions ¶
func InitializeControllerLogger ¶
InitializeControllerLogger initializes a new logger. Panics if the context doesn't already contain a logger. The given name is added to the logger (it's supposed to be the controller's name). Returns the logger and the context containing it.
func IsNil ¶
IsNil checks if a given pointer is nil. Opposed to 'i == nil', this works for typed and untyped nil values.
func K8sNameHash ¶
K8sNameHash takes any number of string arguments and computes a hash out of it, which is then base32-encoded to be a valid k8s resource name. The arguments are joined with '/' before being hashed.
func PrefixWithNamespace ¶
PrefixWithNamespace prefixes the given name with the sourceNamespace.
func ScopeToControlPlane ¶
func ScopeToControlPlane(cpMeta *metav1.ObjectMeta, ids ...string) string
ScopeToControlPlane is a convenience function which wraps K8sNameHash(cpMeta.Namespace, cpMeta.Name, ids...).
Types ¶
This section is empty.