Table of Contents

Class WorkerInfo

Namespace
Virtufin.WorkManager.Contracts
Assembly
Virtufin.WorkManager.dll

Information about a worker instance.

public sealed record WorkerInfo : IEquatable<WorkerInfo>
Inheritance
WorkerInfo
Implements
Inherited Members

Constructors

WorkerInfo(Guid, string, string, List<string>, DateTime, WorkerStatus, Dictionary<string, string>?, Dictionary<string, string>?, Dictionary<string, string>?, string?, string?, uint, uint)

Information about a worker instance.

public WorkerInfo(Guid Id, string MimeType, string Language, List<string> Topics, DateTime CreatedAt, WorkerStatus Status, Dictionary<string, string>? Config = null, Dictionary<string, string>? Tags = null, Dictionary<string, string>? Secrets = null, string? CodeUrl = null, string? Shard = null, uint ShardSize = 0, uint ShardIndex = 0)

Parameters

Id Guid

The unique identifier.

MimeType string

The MIME type of the code.

Language string

The programming language.

Topics List<string>

The topics to subscribe to (one or more).

CreatedAt DateTime

The creation timestamp.

Status WorkerStatus

The current status.

Config Dictionary<string, string>

Worker-instance defaults set at creation (see Config).

Tags Dictionary<string, string>
Secrets Dictionary<string, string>

The worker's secret references (attribute name -> secret key), never values.

CodeUrl string
Shard string
ShardSize uint
ShardIndex uint

Properties

CodeUrl

public string? CodeUrl { get; init; }

Property Value

string

Config

Worker-instance defaults set at creation (see Config).

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

Property Value

Dictionary<string, string>

CreatedAt

The creation timestamp.

public DateTime CreatedAt { get; init; }

Property Value

DateTime

Id

The unique identifier.

public Guid Id { get; init; }

Property Value

Guid

Language

The programming language.

public string Language { get; init; }

Property Value

string

MimeType

The MIME type of the code.

public string MimeType { get; init; }

Property Value

string

Secrets

The worker's secret references (attribute name -> secret key), never values.

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

Status

The current 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>

Methods

PublicCodeUrl(CodeSource)

source's URL for display (CodeUrl): scheme, host and path only. User info, query and fragment are dropped -- a URL may carry inline credentials or a signed query, and ListWorkers is readable by any API caller. Null for inline content.

public static string? PublicCodeUrl(CodeSource source)

Parameters

source CodeSource

Returns

string