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
IdGuidThe unique identifier.
MimeTypestringThe MIME type of the code.
LanguagestringThe programming language.
TopicsList<string>The topics to subscribe to (one or more).
CreatedAtDateTimeThe creation timestamp.
StatusWorkerStatusThe current status.
ConfigDictionary<string, string>Worker-instance defaults set at creation (see Config).
TagsDictionary<string, string>SecretsDictionary<string, string>The worker's secret references (attribute name -> secret key), never values.
CodeUrlstringShardstringShardSizeuintShardIndexuint
Properties
CodeUrl
public string? CodeUrl { get; init; }
Property Value
Config
Worker-instance defaults set at creation (see Config).
public Dictionary<string, string>? Config { get; init; }
Property Value
CreatedAt
The creation timestamp.
public DateTime CreatedAt { get; init; }
Property Value
Id
The unique identifier.
public Guid Id { get; init; }
Property Value
Language
The programming language.
public string Language { get; init; }
Property Value
MimeType
The MIME type of the code.
public string MimeType { get; init; }
Property Value
Secrets
The worker's secret references (attribute name -> secret key), never values.
public Dictionary<string, string>? Secrets { get; init; }
Property Value
Shard
public string? Shard { get; init; }
Property Value
ShardIndex
public uint ShardIndex { get; init; }
Property Value
ShardSize
public uint ShardSize { get; init; }
Property Value
Status
The current status.
public WorkerStatus Status { 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; }
Property Value
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
sourceCodeSource