MCPcopy
hub / github.com/kenn-io/msgvault / statsFakeBackend

Struct statsFakeBackend

internal/vector/stats_test.go:17–24  ·  view source on GitHub ↗

statsFakeBackend implements Backend for CollectStats tests. It is separate from the generations_test.go fakeBackend because those tests stub different methods and we want independent control. Methods not exercised here return errors so any misuse surfaces loudly.

Source from the content-addressed store, hash-verified

15// stub different methods and we want independent control. Methods not
16// exercised here return errors so any misuse surfaces loudly.
17type statsFakeBackend struct {
18 active *Generation
19 activeErr error
20 building *Generation
21 buildErr error
22 statsByGen map[GenerationID]Stats
23 statsErr map[GenerationID]error
24}
25
26func (f *statsFakeBackend) ActiveGeneration(context.Context) (Generation, error) {
27 if f.activeErr != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected