make method to get data out of a module

This commit is contained in:
Joel Wetzell
2026-03-04 12:35:15 -06:00
parent 0d4ec24a9b
commit 6a21cc2639
21 changed files with 163 additions and 0 deletions

View File

@@ -47,6 +47,13 @@ func (mcm *MockCounterModule) Start(ctx context.Context) error {
return nil
}
func (mcm *MockCounterModule) Get(key string) (any, error) {
if key == "count" {
return mcm.outputCount, nil
}
return nil, fmt.Errorf("mock.counter key not found")
}
func (mcm *MockCounterModule) Type() string {
return mcm.config.Type
}