Show / Hide Table of Contents

Class RemoteConfigSource<T>

Configuration source for remote config files.

Inheritance
object
ConfigSource<T>
RemoteConfigSource<T>
Inherited Members
ConfigSource<T>.Config
ConfigSource<T>.Revision
ConfigSource<T>.ReadLocalFile(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cognite.Extractor.Utils.Unstable.Configuration
Assembly: ExtractorUtils.dll
Syntax
public class RemoteConfigSource<T> : ConfigSource<T> where T : VersionedConfig
Type Parameters
Name Description
T

Type of configuration object.

Constructors

| Edit this page View Source

RemoteConfigSource(Client, ILogger?, string, string, bool)

Constructor.

Declaration
public RemoteConfigSource(Client client, ILogger? logger, string integrationId, string configFilePath, bool bufferConfigFile)
Parameters
Type Name Description
Client client

CDF Client

ILogger logger

Logger

string integrationId

ID of the integration to write to.

string configFilePath

Path to local configuration file. The folder is used to create local copies of remote config files if bufferConfigFile is set.

bool bufferConfigFile

Whether to store a local copy of the configuration file.

Methods

| Edit this page View Source

GetConfigWrapper()

Get a wrapper around configuration with information about the remote revision if applicable. This will fail if a config has not been loaded.

Declaration
public override ConfigWrapper<T> GetConfigWrapper()
Returns
Type Description
ConfigWrapper<T>
Overrides
ConfigSource<T>.GetConfigWrapper()
| Edit this page View Source

ResolveConfig(int?, BaseErrorReporter, CancellationToken)

Load configuration, either from a local file or from CDF.

Declaration
public override Task<bool> ResolveConfig(int? targetRevision, BaseErrorReporter reporter, CancellationToken token)
Parameters
Type Name Description
int? targetRevision

Revision to load. Ignored for local config. Null means load the latest.

BaseErrorReporter reporter

Error reporter for writing configuration errors to CDF.

CancellationToken token

Cancellation token

Returns
Type Description
Task<bool>

True if a new configuration file was loaded, false otherwise.

Overrides
ConfigSource<T>.ResolveConfig(int?, BaseErrorReporter, CancellationToken)

Extension Methods

DataModelUtils.GetOrCreateResourcesAsync<T, T2>(T2, IEnumerable<InstanceIdentifier>, Func<IEnumerable<InstanceIdentifier>, IEnumerable<SourcedNodeWrite<T>>>, Func<IEnumerable<SourcedNodeWrite<T>>, SanitationMode, (IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>)>, int, int, RetryMode, SanitationMode, CancellationToken)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX