MCPcopy Create free account
hub / github.com/VictoriaMetrics/operator / getClientCacheOptions

Function getClientCacheOptions

internal/manager/manager.go:466–480  ·  view source on GitHub ↗
(disabledCacheObjects string)

Source from the content-addressed store, hash-verified

464}
465
466func getClientCacheOptions(disabledCacheObjects string) (*client.CacheOptions, error) {
467 var co client.CacheOptions
468 if len(disabledCacheObjects) > 0 {
469 objects := strings.Split(disabledCacheObjects, ",")
470 for _, object := range objects {
471 o, ok := cacheClientObjectsByName[object]
472 if !ok {
473 return nil, fmt.Errorf("not supported client object name=%q", object)
474 }
475 co.DisableFor = append(co.DisableFor, o)
476
477 }
478 }
479 return &co, nil
480}
481
482// cacheClientObjectsByName defines objects for which cache could be disabled via flag controller.disableCacheFor
483//

Callers 1

RunManagerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected