Class WorkerConfig
- Namespace
- Virtufin.WorkManager.Contracts
- Assembly
- Virtufin.WorkManager.dll
Configuration for a worker instance.
public sealed record WorkerConfig : IEquatable<WorkerConfig>
- Inheritance
-
WorkerConfig
- Implements
- Inherited Members
Constructors
WorkerConfig(Guid, CodeSource, string, List<string>, DateTime, List<HistoryEntry>, Dictionary<string, string>?, Dictionary<string, string>?, string?)
Configuration for a worker instance.
public WorkerConfig(Guid Id, CodeSource CodeSource, string MimeType, List<string> Topics, DateTime CreatedAt, List<HistoryEntry> History, Dictionary<string, string>? Config = null, Dictionary<string, string>? Tags = null, string? InstanceId = null)
Parameters
IdGuidThe unique identifier.
CodeSourceCodeSourceThe source of the worker's code.
MimeTypestringThe MIME type of the code.
TopicsList<string>The topics to subscribe to (one or more).
CreatedAtDateTimeThe creation timestamp.
HistoryList<HistoryEntry>The history of code changes.
ConfigDictionary<string, string>Worker-instance defaults, immutable after creation. Delivered to the worker on every incoming trigger CloudEvent as extension attributes (not process environment variables), so values never leak between workers co-loaded in the same WorkManager process.
TagsDictionary<string, string>InstanceIdstring
Properties
CodeSource
The source of the worker's code.
public CodeSource CodeSource { get; init; }
Property Value
Config
Worker-instance defaults, immutable after creation. Delivered to the worker on every incoming trigger CloudEvent as extension attributes (not process environment variables), so values never leak between workers co-loaded in the same WorkManager process.
public Dictionary<string, string>? Config { get; init; }
Property Value
CreatedAt
The creation timestamp.
public DateTime CreatedAt { get; init; }
Property Value
History
The history of code changes.
public List<HistoryEntry> History { get; init; }
Property Value
Id
The unique identifier.
public Guid Id { get; init; }
Property Value
InstanceId
public string? InstanceId { get; init; }
Property Value
MimeType
The MIME type of the code.
public string MimeType { get; init; }
Property Value
Tags
public Dictionary<string, string>? Tags { get; init; }
Property Value
Topics
The topics to subscribe to (one or more).
public List<string> Topics { get; init; }