MCPcopy Create free account
hub / github.com/cozystack/cozystack / ParseShardDeploymentIndex

Function ParseShardDeploymentIndex

internal/fluxshardoperator/config.go:117–123  ·  view source on GitHub ↗

ParseShardDeploymentIndex parses a shard Deployment name back into its shard index.

(name string)

Source from the content-addressed store, hash-verified

115// ParseShardDeploymentIndex parses a shard Deployment name back into its
116// shard index.
117func ParseShardDeploymentIndex(name string) (int, bool) {
118 rest, found := strings.CutPrefix(name, shardDeploymentPrefix)
119 if !found {
120 return 0, false
121 }
122 return ParseShardIndex(rest)
123}
124
125// ParseShardCount parses the --shard-count flag value: "auto" enables
126// automatic sizing, otherwise a positive integer is an explicit shard count.

Callers 4

effectiveShardCountMethod · 0.85
pruneExtraShardsMethod · 0.85
observeShardsMethod · 0.85

Calls 1

ParseShardIndexFunction · 0.85

Tested by 1