serviceref

package
v0.0.0-...-88fcef1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package serviceref defines the namespace-qualified identity of a mesh service (proposal 020 Part 1). A mesh service is identified by the pair (namespace, name) — where name is the workload's ServiceAccount — and this package is the single source of truth for how that identity is rendered as:

  • a registry / map KEY: "<namespace>/<name>" (Key)
  • the mesh FQDN: "<name>.<namespace>.<meshDomain>" (FQDN)
  • the standard k8s FQDN: "<name>.<namespace>.svc.cluster.local" (ClusterLocalFQDN)

Centralizing these formats here keeps the namespace from being re-derived from a union or smuggled through bare strings — the exact trap proposal 020 calls out. It is a leaf package (no aether imports) so the registry, agent, CNI, and registrar can all share it without import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceRef

type ServiceRef struct {
	Namespace string
	Name      string
}

ServiceRef is the namespace-qualified identity of a mesh service. Name is the workload's ServiceAccount (aether's identity unit); Namespace is the Kubernetes namespace the workload runs in.

func New

func New(namespace, name string) ServiceRef

New returns a ServiceRef for the given namespace and name (ServiceAccount).

func ParseKey

func ParseKey(s string) (ref ServiceRef, ok bool)

ParseKey parses a "<namespace>/<name>" key back into a ServiceRef. ok is false when s is not a well-formed key (missing or empty namespace/name) — callers must treat a malformed key as a hard error, never as a namespace-free name.

func (ServiceRef) ClusterLocalFQDN

func (r ServiceRef) ClusterLocalFQDN() string

ClusterLocalFQDN returns the standard Kubernetes name "<name>.<namespace>.svc.cluster.local", which the transparent-capture path also honors so apps reaching a mesh service by its ordinary k8s DNS name are captured (proposal 020 Part 1).

func (ServiceRef) FQDN

func (r ServiceRef) FQDN(meshDomain string) string

FQDN returns the mesh fully-qualified name "<name>.<namespace>.<meshDomain>" — the cluster name / SNI / route-target authority the proxy uses mesh-internally.

func (ServiceRef) Key

func (r ServiceRef) Key() string

Key returns the registry / map key "<namespace>/<name>". This is the namespace-qualified key that replaces the old namespace-free ServiceAccount key (proposal 020 Part 1, hard cutover).

func (ServiceRef) String

func (r ServiceRef) String() string

String returns the Key form, so a ServiceRef formats sensibly in logs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL