Table of Contents

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

Id Guid

The unique identifier.

CodeSource CodeSource

The source of the worker's code.

MimeType string

The MIME type of the code.

Topics List<string>

The topics to subscribe to (one or more).

CreatedAt DateTime

The creation timestamp.

History List<HistoryEntry>

The history of code changes.

Config Dictionary<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.

Tags Dictionary<string, string>
InstanceId string

Properties

CodeSource

The source of the worker's code.

public CodeSource CodeSource { get; init; }

Property Value

CodeSource

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

Dictionary<string, string>

CreatedAt

The creation timestamp.

public DateTime CreatedAt { get; init; }

Property Value

DateTime

History

The history of code changes.

public List<HistoryEntry> History { get; init; }

Property Value

List<HistoryEntry>

Id

The unique identifier.

public Guid Id { get; init; }

Property Value

Guid

InstanceId

public string? InstanceId { get; init; }

Property Value

string

MimeType

The MIME type of the code.

public string MimeType { get; init; }

Property Value

string

Tags

public Dictionary<string, string>? Tags { get; init; }

Property Value

Dictionary<string, string>

Topics

The topics to subscribe to (one or more).

public List<string> Topics { get; init; }

Property Value

List<string>