Class WorkerTypeNames
- Namespace
- Virtufin.Worker.DevKit
- Assembly
- Virtufin.Worker.DevKit.dll
The names of one worker type, from the naming library's
virtufin.core/worker entity bound to the type (openspec
pubsub-topics, Name Derivation): wrk.<type>.response,
wrk.<type>.error, wrk.<type>.command.{worker_id},
com.virtufin.<type>.<event> and
urn:com.virtufin:worker:<type>. Plain strings only, so no
naming type crosses the Runtime's host-shared boundary.
public sealed record WorkerTypeNames : IEquatable<WorkerTypeNames>
- Inheritance
-
WorkerTypeNames
- Implements
- Inherited Members
Constructors
WorkerTypeNames(string, string, string, string, string, string, string)
The names of one worker type, from the naming library's
virtufin.core/worker entity bound to the type (openspec
pubsub-topics, Name Derivation): wrk.<type>.response,
wrk.<type>.error, wrk.<type>.command.{worker_id},
com.virtufin.<type>.<event> and
urn:com.virtufin:worker:<type>. Plain strings only, so no
naming type crosses the Runtime's host-shared boundary.
public WorkerTypeNames(string WorkerType, string Source, string ResponseType, string ResponseTopic, string ErrorType, string ErrorTopic, string CommandTopic)
Parameters
WorkerTypestringThe worker type, lowercase kebab vocabulary (e.g.
httpgetworker).SourcestringThe CloudEvent
sourceof the worker's outputs.ResponseTypestringThe
ce-typeof a response.ResponseTopicstringThe default topic of a response.
ErrorTypestringThe
ce-typeof an error response.ErrorTopicstringThe default topic of an error response.
CommandTopicstringThe command topic template, with the
{worker_id}placeholder WorkManager expands at creation.
Fields
WorkerEntity
The core worker entity id.
public const string WorkerEntity = "virtufin.core/worker"
Field Value
WorkerIdParam
The worker id parameter (and placeholder) of the command topic.
public const string WorkerIdParam = "worker_id"
Field Value
WorkerTypeParam
The worker type parameter of WorkerEntity.
public const string WorkerTypeParam = "worker_type"
Field Value
Properties
CommandTopic
The command topic template, with the {worker_id} placeholder WorkManager expands at creation.
public string CommandTopic { get; init; }
Property Value
ErrorTopic
The default topic of an error response.
public string ErrorTopic { get; init; }
Property Value
ErrorType
The ce-type of an error response.
public string ErrorType { get; init; }
Property Value
ResponseTopic
The default topic of a response.
public string ResponseTopic { get; init; }
Property Value
ResponseType
The ce-type of a response.
public string ResponseType { get; init; }
Property Value
Source
The CloudEvent source of the worker's outputs.
public string Source { get; init; }
Property Value
WorkerType
The worker type, lowercase kebab vocabulary (e.g. httpgetworker).
public string WorkerType { get; init; }
Property Value
Methods
For(string)
The names of workerType. Throws
Virtufin.Naming.NamingException if it is not lowercase kebab vocabulary.
public static WorkerTypeNames For(string workerType)
Parameters
workerTypestring