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?, WorkerStatus, bool, Dictionary<string, string>?, string?, uint, uint)

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, WorkerStatus Status = WorkerStatus.Unspecified, bool StartRequested = false, Dictionary<string, string>? Secrets = null, string? Shard = null, uint ShardSize = 0, uint ShardIndex = 0)

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 Runtime process.

Tags Dictionary<string, string>
InstanceId string
Status WorkerStatus

The persisted lifecycle status.

StartRequested bool
Secrets Dictionary<string, string>
Shard string
ShardSize uint
ShardIndex uint

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 Runtime 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

Secrets

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

Property Value

Dictionary<string, string>

Shard

public string? Shard { get; init; }

Property Value

string

ShardIndex

public uint ShardIndex { get; init; }

Property Value

uint

ShardSize

public uint ShardSize { get; init; }

Property Value

uint

StartRequested

public bool StartRequested { get; init; }

Property Value

bool

Status

The persisted lifecycle status.

public WorkerStatus Status { get; init; }

Property Value

WorkerStatus

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>