Categorygithub.com/kcp-dev/logicalcluster/v2
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>.

# Variables

None is the name indicating a cluster-unaware context.
TODO is a value created by automated refactoring tools that should be replaced by a real Name.
Wildcard is the name indicating cross-workspace requests.

# Structs

Name is the name of a logical cluster.

# Interfaces

Object is a local interface representation of the Kubernetes metav1.Object, to avoid dependencies on k8s.io/apimachinery.