Virtufin Worker DevKit
The shared toolkit for every .NET Virtufin worker: payload codecs selected by
datacontenttype, CloudEvent bindings, and the base classes worker packages
build on.
var codec = CodecBuilder.Create()
.Add<Candle>("application/json", CandleJson.Decode, CandleJson.Encode)
.Add<OrderBookView>(
OrderBookImage.ContentType,
ce => OrderBookImage.Read(CodecBytes.From(ce)),
BookImage.Encode)
.Build();
var candle = codec.Decode<Candle>(cloudEvent);
var changed = codec.Encode(value, "application/json");
Start here
| You want to | Read |
|---|---|
| Understand how the toolkit relates to the WorkManager | Layers |
| Know which repo publishes what | Repos and packages |
| Register a payload format | Registry |
| Publish or read FlatBuffers | FlatBuffers |
| Know what can be thrown | Errors |
| Move a worker from the old host package | Migration |
Status
The codec registry is implemented and tested (25 tests). The binding/envelope layer and the worker base classes land with the next packages; this site grows with them — pages are added when the code they describe exists, never before.