diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-04 15:38:30 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-04 15:38:30 -0500 |
commit | cc7ba659adbc5ad55e1ce67f76952f2b8392c9c9 (patch) | |
tree | 2df3f62bd4dcda45732b0955f2797596f0ae5743 /runner_builder.go | |
parent | b3252d2bd488b5b58cf0e46151ff9db0721c5fc6 (diff) | |
download | deb-planr-cc7ba659adbc5ad55e1ce67f76952f2b8392c9c9.tar.xz deb-planr-cc7ba659adbc5ad55e1ce67f76952f2b8392c9c9.zip |
Refactor build/eval pipeline to use clearer IO model and adapter segmentation methods
Diffstat (limited to 'runner_builder.go')
-rw-r--r-- | runner_builder.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/runner_builder.go b/runner_builder.go index b369635..b3c07d9 100644 --- a/runner_builder.go +++ b/runner_builder.go @@ -1,16 +1,19 @@ package planr type RunnerBuilder struct { - adapters [] Adapter + adapters map[string] Adapter dirs DirConfig } func ConfigureRunner() RunnerBuilder { - return RunnerBuilder {} + builder := RunnerBuilder{} + builder.adapters = make(map[string] Adapter, 0) + return builder } func RegisterAdapter(b RunnerBuilder, a Adapter) RunnerBuilder { - b.adapters = append(b.adapters, a) + nm := a.Config().Name + b.adapters[nm] = a return b } |