Add chunk plan cache configuration and storage

This commit is contained in:
2026-07-18 00:07:53 +00:00
parent 7844c0a93f
commit ebd449d847
13 changed files with 843 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
package pipeline
import (
"fmt"
"strings"
)
type ChunkCacheMode string
const (
ChunkCacheAuto ChunkCacheMode = "auto"
ChunkCacheBypass ChunkCacheMode = "bypass"
ChunkCacheRefresh ChunkCacheMode = "refresh"
)
func ParseChunkCacheMode(raw string) (ChunkCacheMode, error) {
mode := ChunkCacheMode(strings.TrimSpace(raw))
switch mode {
case ChunkCacheAuto, ChunkCacheBypass, ChunkCacheRefresh:
return mode, nil
default:
return "", fmt.Errorf("chunk cache mode %q is not supported", strings.TrimSpace(raw))
}
}
func (m ChunkCacheMode) Validate() error {
_, err := ParseChunkCacheMode(string(m))
return err
}