Table of Contents

Class CreateWorkerRequest

Namespace
Virtufin.WorkManager.Protos
Assembly
Virtufin.WorkManager.Protos.dll
public sealed class CreateWorkerRequest : IMessage<CreateWorkerRequest>, IEquatable<CreateWorkerRequest>, IDeepCloneable<CreateWorkerRequest>, IBufferMessage, IMessage
Inheritance
CreateWorkerRequest
Implements
IDeepCloneable<CreateWorkerRequest>
IBufferMessage
IMessage
Inherited Members

Constructors

CreateWorkerRequest()

public CreateWorkerRequest()

CreateWorkerRequest(CreateWorkerRequest)

public CreateWorkerRequest(CreateWorkerRequest other)

Parameters

other CreateWorkerRequest

Fields

CodeSourceFieldNumber

Field number for the "code_source" field.

public const int CodeSourceFieldNumber = 1

Field Value

int

ConfigFieldNumber

Field number for the "config" field.

public const int ConfigFieldNumber = 4

Field Value

int

MimeTypeFieldNumber

Field number for the "mime_type" field.

public const int MimeTypeFieldNumber = 2

Field Value

int

SecretsFieldNumber

Field number for the "secrets" field.

public const int SecretsFieldNumber = 6

Field Value

int

ShardFieldNumber

Field number for the "shard" field.

public const int ShardFieldNumber = 7

Field Value

int

ShardIndexFieldNumber

Field number for the "shard_index" field.

public const int ShardIndexFieldNumber = 9

Field Value

int

ShardSizeFieldNumber

Field number for the "shard_size" field.

public const int ShardSizeFieldNumber = 8

Field Value

int

TagsFieldNumber

Field number for the "tags" field.

public const int TagsFieldNumber = 5

Field Value

int

TopicsFieldNumber

Field number for the "topics" field.

public const int TopicsFieldNumber = 3

Field Value

int

Properties

CodeSource

public CodeSource CodeSource { get; set; }

Property Value

CodeSource

Config

Worker-instance defaults, immutable after creation. Delivered to the worker on every incoming trigger CloudEvent as extension attributes (the same generic mechanism used for correlationid) -- NOT process environment variables, so values never leak between workers co-loaded in the same WorkManager process. A worker's own payload field (if present on the triggering event) takes precedence; config is only the fallback.

public MapField<string, string> Config { get; }

Property Value

MapField<string, string>

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

MimeType

public string MimeType { get; set; }

Property Value

string

Parser

public static MessageParser<CreateWorkerRequest> Parser { get; }

Property Value

MessageParser<CreateWorkerRequest>

Secrets

Secrets by reference: extension-attribute name -> key of the deployment's worker secret (a Dapr secret store; see docs/v1/worker-secrets.md). Only the references are persisted and returned by ListWorkers. The Runtime resolves the values in memory and stamps them onto every triggering CloudEvent like config, overriding an attribute of the same name on the event, and drops them from the worker's outputs. A name must not also be a config key. Runtime-hosted worker types only.

public MapField<string, string> Secrets { get; }

Property Value

MapField<string, string>

Shard

Sharding. Workers created with the same shard name and size split the events of every topic they share: each event is handled by exactly one member (not a broker consumer group; see docs/v1/delivery.md). Empty shard = a dedicated worker (broadcast, the default).

public string Shard { get; set; }

Property Value

string

ShardIndex

This member's slot in [0, shard_size). Must be unique among live members that share a topic; StartWorker refuses a duplicate.

public uint ShardIndex { get; set; }

Property Value

uint

ShardSize

The shard's member count. Every live member must use the same value: the event's slot is hash(subject or id) % shard_size.

public uint ShardSize { get; set; }

Property Value

uint

Tags

public MapField<string, string> Tags { get; }

Property Value

MapField<string, string>

Topics

One or more topics the worker subscribes to. A triggering CloudEvent arriving on any of them is dispatched to this worker.

public RepeatedField<string> Topics { get; }

Property Value

RepeatedField<string>

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public CreateWorkerRequest Clone()

Returns

CreateWorkerRequest

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(CreateWorkerRequest)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CreateWorkerRequest other)

Parameters

other CreateWorkerRequest

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(CreateWorkerRequest)

Merges the given message into this one.

public void MergeFrom(CreateWorkerRequest other)

Parameters

other CreateWorkerRequest

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.