apiserverk8s.io/apiserver/pkg/sharding Index | Files

package sharding

import "k8s.io/apiserver/pkg/sharding"

Index

Functions

func Parse

func Parse(expr string) (apisharding.Selector, error)

Parse parses a CEL-based shard selector expression into a Selector.

The expression format is:

shardRange(object.metadata.uid, '0x0', '0x8000000000000000')
shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(...)

Only the shardRange() function and || operator are permitted. The CEL expression is parsed but never evaluated — the AST is walked to extract shard range requirements.

Source Files

parser.go

Version
v0.36.0 (latest)
Published
Apr 22, 2026
Platform
linux/amd64
Imports
7 packages
Last checked
5 days ago

Tools for package owners.