Zum Hauptinhalt springen

INodeContext

Namespace: Meshmakers.Octo.Sdk.Common.EtlDataPipeline.Nodes

Interface for the node context

public interface INodeContext

Properties​

ServiceProvider​

Gets the service provider

public abstract IServiceProvider ServiceProvider { get; }

Property Value​

IServiceProvider

PipelineDebugger​

Gets the debugger for the pipeline, when enabled

public abstract IPipelineDebugger PipelineDebugger { get; }

Property Value​

IPipelineDebugger

PipelineExecutionMode​

Gets the per-execution mode flags (e.g. dry-run) set by the executor. Null when the pipeline runs in default (real-effect) mode. Load nodes that honour dry-run check PipelineExecutionMode?.IsDryRun and call INodeContext.RecordDryRunIntent(String, Object) to emit the would-be payload instead of firing the real sink.

public abstract IPipelineExecutionMode PipelineExecutionMode { get; }

Property Value​

IPipelineExecutionMode

ScratchSpace​

Per-execution scratch space for large binary artifacts. Nodes that produce or consume big binaries (merged PDFs, ZIP archives) write them to scratch files and pass a small handle token through the data context instead of base64, avoiding the LOH pressure that carrying the bytes inline causes. Null when the executor did not provide one (e.g. some test harnesses) — a node that requires scratch mode must guard for null and fall back to inline handling or fail with a clear message.

public abstract IPipelineScratchSpace ScratchSpace { get; }

Property Value​

IPipelineScratchSpace

SecretRegistry​

The plaintext values this execution must keep out of its diagnostics (AB#5538): debug snapshots, dry-run intents, the execution log and the persisted execution result mask them with PipelineSecretRegistry.Mask. One instance per execution, shared by every node context of it. null for node contexts that do not provide one (test doubles); INodeContext.RegisterSecret(String) is then a no-op.

public PipelineSecretRegistry SecretRegistry { get; }

Property Value​

PipelineSecretRegistry

Parent​

Parent node context. If it is null, then it is the root node.

public abstract INodeContext Parent { get; }

Property Value​

INodeContext

NodePath​

Gets the node path

public abstract NodePath NodePath { get; }

Property Value​

NodePath

NodeId​

Gets the node id

public abstract NodePath NodeId { get; }

Property Value​

NodePath

SequenceNumber​

Gets the sequence number of the node within a transformation list.

public abstract uint SequenceNumber { get; }

Property Value​

UInt32

NodeStack​

Returns the node calling stack

public abstract Stack<NodePath> NodeStack { get; }

Property Value​

Stack<NodePath>

Methods​

RegisterSecret(String)​

Marks plaintext as secret for the rest of this execution, so every diagnostic output shows PipelineSecretRegistry.Mask instead (AB#5538). Nodes call it for every plaintext they put into the data context or resolve from configuration: RevealSecret@1 for the revealed value, credential-consuming nodes for the password, token or key they use. The value itself is not changed — downstream nodes still read the plaintext.

void RegisterSecret(string plaintext)

Parameters​

plaintext String
The value; null or blank values are ignored

GetNodeConfiguration<T>()​

Get configuration for the current node

T GetNodeConfiguration<T>()

Type Parameters​

T
Generic type of configuration

Returns​

T

Debug(String, Object[])​

Logs a message with debug severity

void Debug(string message, Object[] args)

Parameters​

message String
The message to log

args Object[]
Arguments for logging message

Info(String, Object[])​

Logs a message with information severity

void Info(string message, Object[] args)

Parameters​

message String
The message to log

args Object[]
Arguments for logging message

Warning(String, Object[])​

Logs a message with warning severity

void Warning(string message, Object[] args)

Parameters​

message String
The message to log

args Object[]
Arguments for logging message

Error(String, Object[])​

Logs a message with error severity

void Error(string message, Object[] args)

Parameters​

message String
The message to log

args Object[]
Arguments for logging message

Error(Exception, String, Object[])​

Logs an exception with error severity

void Error(Exception exception, string message, Object[] args)

Parameters​

exception Exception
The exception

message String
The message to log

args Object[]
Arguments for logging message

RecordDryRunIntent(String, Object)​

Records that this node WOULD have applied a side effect without actually applying it. The intent payload is JSON-serialised into the debug stream for the caller to inspect. Only meaningful when the executor configured INodeContext.PipelineExecutionMode with IsDryRun = true; in any other run it is a cheap no-op (no debugger → nothing recorded).

void RecordDryRunIntent(string nodeTypeName, object intentPayload)

Parameters​

nodeTypeName String
Human-readable node type name (e.g. ApplyChanges@1).

intentPayload Object
An object describing what would have been written. Serialised verbatim with the canonical pipeline STJ options bundle.

Unregister(IDataContext)​

Unregisters the current node from the node context

void Unregister(IDataContext dataContext)

Parameters​

dataContext IDataContext

RegisterChildNode(UInt32, INodeConfiguration, IDataContext)​

Register a node as a child of the current node

INodeContext RegisterChildNode(uint sequenceNumber, INodeConfiguration nodeConfiguration, IDataContext dataContext)

Parameters​

sequenceNumber UInt32
Sequence number of the node within a transformation list

nodeConfiguration INodeConfiguration
Node configuration

dataContext IDataContext
Data context

Returns​

INodeContext

RegisterChildNode(String, UInt32, INodeConfiguration, IDataContext)​

Register a node as a child of the current node

INodeContext RegisterChildNode(string nodeQualifiedName, uint sequenceNumber, INodeConfiguration nodeConfiguration, IDataContext dataContext)

Parameters​

nodeQualifiedName String
The qualified name of the node

sequenceNumber UInt32
Sequence number of the node within a transformation list

nodeConfiguration INodeConfiguration
Node configuration

dataContext IDataContext
Data context

Returns​

INodeContext

RegisterChildNode(String, INodeConfiguration, IDataContext)​

Register a node as a child of the current node

INodeContext RegisterChildNode(string nodeQualifiedName, INodeConfiguration nodeConfiguration, IDataContext dataContext)

Parameters​

nodeQualifiedName String
The qualified name of the node

nodeConfiguration INodeConfiguration
Node configuration

dataContext IDataContext
Data context

Returns​

INodeContext