package delegator
import "k8s.io/apiserver/pkg/storage/cacher/delegator"
Index ¶
- func ConsistentReadSupported() bool
- type CacheWithoutSnapshots
- func (c CacheWithoutSnapshots) ShouldDelegateConsistentRead() (Result, error)
- func (c CacheWithoutSnapshots) ShouldDelegateContinue(continueToken string, recursive bool) (Result, error)
- func (c CacheWithoutSnapshots) ShouldDelegateExactRV(rv string, recursive bool) (Result, error)
- type Helper
- type Result
Functions ¶
func ConsistentReadSupported ¶
func ConsistentReadSupported() bool
ConsistentReadSupported returns whether cache can be used to serve reads with RV not yet observed by cache, including both consistent reads. Function is located here to avoid import cycles between staging/src/k8s.io/apiserver/pkg/storage/cacher/delegator.go and staging/src/k8s.io/apiserver/pkg/util/flow_control/request/list_work_estimator.go.
Types ¶
type CacheWithoutSnapshots ¶
type CacheWithoutSnapshots struct{}
func (CacheWithoutSnapshots) ShouldDelegateConsistentRead ¶
func (c CacheWithoutSnapshots) ShouldDelegateConsistentRead() (Result, error)
func (CacheWithoutSnapshots) ShouldDelegateContinue ¶
func (c CacheWithoutSnapshots) ShouldDelegateContinue(continueToken string, recursive bool) (Result, error)
func (CacheWithoutSnapshots) ShouldDelegateExactRV ¶
func (c CacheWithoutSnapshots) ShouldDelegateExactRV(rv string, recursive bool) (Result, error)
type Helper ¶
type Helper interface { ShouldDelegateExactRV(rv string, recursive bool) (Result, error) ShouldDelegateContinue(continueToken string, recursive bool) (Result, error) ShouldDelegateConsistentRead() (Result, error) }
type Result ¶
type Result struct { // Whether a request cannot be served by cache and should be delegated to etcd. ShouldDelegate bool // Whether a request is a consistent read, used by delegator to decide if it should call GetCurrentResourceVersion to get RV. // Included in interface as only cacher has keyPrefix needed to parse continue token. ConsistentRead bool }
Result of delegator decision.
func ShouldDelegateList ¶
func ShouldDelegateList(opts storage.ListOptions, cache Helper) (Result, error)
func ShouldDelegateListMeta ¶
func ShouldDelegateListMeta(opts *metav1.ListOptions, cache Helper) (Result, error)
Source Files ¶
interface.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 8 hours ago –
Tools for package owners.