Class MasterCoordinator
Default coordinator for consuming a MetricsPlan and ComputationConfig object, running a series of IMetricsPlanTransformer to prepare the artifact for script-generation, and finally emitting a runnable script.
Implements
Inherited Members
Namespace: Mangrove.Coordinator
Assembly: Mangrove.Coordinator.dll
Syntax
public class MasterCoordinator : LoggingTransformerBase, IMetricsPlanTransformer, IEmitter, IGenericMetricsPlanTransformer<IDictionary<string, MemoryStream>>
Constructors
View SourceMasterCoordinator(ComputationConfig, ILogger, Boolean, IEmitterFactory)
Create a basic coordinator with given configuration, logger, and debug flag.
Declaration
public MasterCoordinator(ComputationConfig config, ILogger logger, bool debug, IEmitterFactory emitterFactory = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ComputationConfig | config | |
| ILogger | logger | |
| Boolean | debug | |
| IEmitterFactory | emitterFactory |
Properties
View SourceAssumption
Declaration
public IMetricsPlanValidator Assumption { get; }
Property Value
| Type | Description |
|---|---|
| IMetricsPlanValidator |
Extern
Declaration
public ExternKind Extern { get; }
Property Value
| Type | Description |
|---|---|
| ExternKind |
Methods
View SourceTransform(MetricsPlan)
Run TransformWithTracing(MetricsPlan, IMetricsPlanValidator), then emit code.
Declaration
public IDictionary<string, MemoryStream> Transform(MetricsPlan plan)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricsPlan | plan |
Returns
| Type | Description |
|---|---|
| IDictionary<String, MemoryStream> |
TransformWithTracing(MetricsPlan, IMetricsPlanValidator)
Run a series of transformers to produce a "good" MetricsPlan for emission.
Declaration
public override MetricsPlan TransformWithTracing(MetricsPlan plan, IMetricsPlanValidator validator)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricsPlan | plan | Freshly deserialized MetricsPlan. |
| IMetricsPlanValidator | validator | Should be Assumption |
Returns
| Type | Description |
|---|---|
| MetricsPlan | A MetricsPlan ready to be handed over to an emitter. |