MCPcopy Create free account
hub / github.com/cortexproject/cortex / MockClient

Struct MockClient

pkg/ring/lifecycler_test.go:390–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390type MockClient struct {
391 ListFunc func(ctx context.Context, prefix string) ([]string, error)
392 GetFunc func(ctx context.Context, key string) (any, error)
393 DeleteFunc func(ctx context.Context, key string) error
394 CASFunc func(ctx context.Context, key string, f func(in any) (out any, retry bool, err error)) error
395 WatchKeyFunc func(ctx context.Context, key string, f func(any) bool)
396 WatchPrefixFunc func(ctx context.Context, prefix string, f func(string, any) bool)
397}
398
399func (m *MockClient) List(ctx context.Context, prefix string) ([]string, error) {
400 if m.ListFunc != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected