Class ExtractorRunnerParams<TConfig, TExtractor>
Parameters for launching an extractor. Can be modified after config is loaded by defining a ConfigCallback.
Inherited Members
Namespace: Cognite.Extractor.Utils
Assembly: ExtractorUtils.dll
Syntax
public class ExtractorRunnerParams<TConfig, TExtractor> where TConfig : VersionedConfig where TExtractor : BaseExtractor<TConfig>
Type Parameters
Name | Description |
---|---|
TConfig | Type of config object |
TExtractor | Type of extractor object |
Properties
| Edit this page View SourceAcceptedConfigVersions
List of accepted config versions. Can be set to null to ignore.
Declaration
public int[]? AcceptedConfigVersions { get; set; }
Property Value
Type | Description |
---|---|
int[] |
AddLogger
True to add logging
Declaration
public bool AddLogger { get; set; }
Property Value
Type | Description |
---|---|
bool |
AddMetrics
True to add metrics
Declaration
public bool AddMetrics { get; set; }
Property Value
Type | Description |
---|---|
bool |
AddStateStore
True if the extractor uses a state store
Declaration
public bool AddStateStore { get; set; }
Property Value
Type | Description |
---|---|
bool |
AllowRemoteConfig
Allow users to set type: remote and fetch config from extraction pipelines.
Declaration
public bool AllowRemoteConfig { get; set; }
Property Value
Type | Description |
---|---|
bool |
AppId
AppId to use if CDF destination is defined
Declaration
public string? AppId { get; set; }
Property Value
Type | Description |
---|---|
string |
BufferRemoteConfig
True to buffer config if it is fetched from remote. Requires a config path to be set. Defaults to true.
Declaration
public bool BufferRemoteConfig { get; set; }
Property Value
Type | Description |
---|---|
bool |
BuildLogger
Method to build logger from config. Defaults to GetConfiguredLogger(LoggerConfig)
Declaration
public Func<LoggerConfig, ILogger>? BuildLogger { get; set; }
Property Value
Type | Description |
---|---|
Func<LoggerConfig, ILogger> |
Config
Predefined config object, used instead of defining a config path.
Declaration
public TConfig? Config { get; set; }
Property Value
Type | Description |
---|---|
TConfig |
ConfigCallback
Called after config has been read. Can be used to modify the runner params and config object based on external parameters. New services can also be registered here based on the configuration object.
Declaration
public Action<TConfig, ExtractorRunnerParams<TConfig, TExtractor>, ServiceCollection>? ConfigCallback { get; set; }
Property Value
Type | Description |
---|---|
Action<TConfig, ExtractorRunnerParams<TConfig, TExtractor>, ServiceCollection> |
ConfigPath
Path to config file
Declaration
public string? ConfigPath { get; set; }
Property Value
Type | Description |
---|---|
string |
ConfigTypes
List of configuration types that should be registered if they are present on TConfig
.
Declaration
public IEnumerable<Type>? ConfigTypes { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<Type> |
ExtServices
Predefined list of services.
Declaration
public ServiceCollection? ExtServices { get; set; }
Property Value
Type | Description |
---|---|
ServiceCollection |
IsFatalException
Let this method return true if the exception is fatal and the extractor should terminate.
Declaration
public Func<Exception, bool>? IsFatalException { get; set; }
Property Value
Type | Description |
---|---|
Func<Exception, bool> |
LogException
Method to log exceptions. Default is just a simple log message with the exception.
Declaration
public Action<ILogger, Exception, string>? LogException { get; set; }
Property Value
Type | Description |
---|---|
Action<ILogger, Exception, string> |
OnCreateExtractor
Called when the extractor has been built.
Declaration
public Action<CogniteDestination?, TExtractor>? OnCreateExtractor { get; set; }
Property Value
Type | Description |
---|---|
Action<CogniteDestination, TExtractor> |
RemoteConfig
Optional pre-existing remote config, used to inject the config object, for example from the command line.
Declaration
public RemoteConfig? RemoteConfig { get; set; }
Property Value
Type | Description |
---|---|
RemoteConfig |
RequireDestination
True to require a CogniteDestination to be set.
Declaration
public bool RequireDestination { get; set; }
Property Value
Type | Description |
---|---|
bool |
Restart
True to restart if the extractor fails.
Declaration
public bool Restart { get; set; }
Property Value
Type | Description |
---|---|
bool |
StartupLogger
Logger to use before config has been loaded.
Declaration
public ILogger? StartupLogger { get; set; }
Property Value
Type | Description |
---|---|
ILogger |
UserAgent
User agent to use if CDF destination is defined
Declaration
public string? UserAgent { get; set; }
Property Value
Type | Description |
---|---|
string |
WaitForConfig
Wait for config to be loaded, even if Restart is set to false.
Declaration
public bool WaitForConfig { get; set; }
Property Value
Type | Description |
---|---|
bool |