mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
make method to get data out of a module
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user