modulepackage
2.0.0-alpha.4
Repository: https://github.com/kcp-dev/logicalcluster.git
Documentation: pkg.go.dev
# README
logicalcluster
A library for logical-cluster-aware code.
For contributions, issues, or general discussion, please see the kcp repository.
# Functions
ClusterFromContext extracts a cluster name from the context.
From returns the logical cluster name for obj.
New returns a Name from a string.
NewValidated returns a Name from a string and whether it is a valid logical cluster.
WithCluster injects a cluster name into a context.
# Constants
AnnotationKey is the name of the annotation key used to denote an object's logical cluster.
ClusterHeader set to "<lcluster>" on a request is an alternative to accessing the cluster via /clusters/<lcluster>.
# Interfaces
Object is a local interface representation of the Kubernetes metav1.Object, to avoid dependencies on k8s.io/apimachinery.