Convert mock provider to async provider

This commit is contained in:
Sargun Dhillon
2019-05-17 17:15:20 -07:00
parent d0c0d90451
commit dd71a884b3
3 changed files with 160 additions and 82 deletions

View File

@@ -9,6 +9,8 @@ import (
func init() {
register("mock", initMock)
register("mocklegacy", initMockLegacy)
}
func initMock(cfg InitConfig) (providers.Provider, error) {
@@ -20,3 +22,13 @@ func initMock(cfg InitConfig) (providers.Provider, error) {
cfg.DaemonPort,
)
}
func initMockLegacy(cfg InitConfig) (providers.Provider, error) {
return mock.NewMockLegacyProvider(
cfg.ConfigPath,
cfg.NodeName,
cfg.OperatingSystem,
cfg.InternalIP,
cfg.DaemonPort,
)
}