MCPcopy
hub / github.com/kubernetes/client-go / FakeCustomStore

Struct FakeCustomStore

tools/cache/fake_custom_store.go:20–30  ·  view source on GitHub ↗

FakeStore lets you define custom functions for store operations

Source from the content-addressed store, hash-verified

18
19// FakeStore lets you define custom functions for store operations
20type FakeCustomStore struct {
21 AddFunc func(obj interface{}) error
22 UpdateFunc func(obj interface{}) error
23 DeleteFunc func(obj interface{}) error
24 ListFunc func() []interface{}
25 ListKeysFunc func() []string
26 GetFunc func(obj interface{}) (item interface{}, exists bool, err error)
27 GetByKeyFunc func(key string) (item interface{}, exists bool, err error)
28 ReplaceFunc func(list []interface{}, resourceVerion string) error
29 ResyncFunc func() error
30}
31
32// Add calls the custom Add function if defined
33func (f *FakeCustomStore) Add(obj interface{}) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected