snapversion

package
v0.0.0-...-c46dd35 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package snapversion generates xDS snapshot version strings for the agent cache.

A version string is "timestamp.counter.label" (e.g. "1704067200000.42.snapshot"): a Unix millisecond timestamp, an atomic counter increment, and a resource-type label. The timestamp+counter pair keeps versions unique and monotonically ordered so go-control-plane never applies an older snapshot after a newer one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(label string, counter *atomic.Uint64) string

Generate creates a snapshot version string by combining a Unix millisecond timestamp, an atomic counter increment, and a label. The format is "timestamp.counter.label" (e.g., "1704067200000.42.listener"). This ensures version strings are unique and ordered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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