Documentation
¶
Index ¶
- Variables
- func TaskProgressBuildEntities[StringArrayAttr TaskProgressStringArrayAttrI, ...](dml DML, c *TaskProgressColumns) (err error)
- func TaskProgressFillFromArrow[StringArrayAttrs TaskProgressStringArrayAttrsReadI, ...](c *TaskProgressColumns, n int, idCol *array.Uint64, nkCol *array.Binary, ...) (err error)
- type TaskProgressCodec
- type TaskProgressColumns
- type TaskProgressEntityI
- type TaskProgressF64ArrayAttrI
- type TaskProgressF64ArrayAttrsReadI
- type TaskProgressF64ArrayMembsReadI
- type TaskProgressF64ArraySecI
- type TaskProgressI64ArrayAttrI
- type TaskProgressI64ArrayAttrsReadI
- type TaskProgressI64ArrayMembsReadI
- type TaskProgressI64ArraySecI
- type TaskProgressStringArrayAttrI
- type TaskProgressStringArrayAttrsReadI
- type TaskProgressStringArrayMembsReadI
- type TaskProgressStringArraySecI
- type TaskProgressSymbolAttrI
- type TaskProgressSymbolAttrsReadI
- type TaskProgressSymbolMembsReadI
- type TaskProgressSymbolSecI
- type TaskProgressTextArrayAttrI
- type TaskProgressTextArrayAttrsReadI
- type TaskProgressTextArrayMembsReadI
- type TaskProgressTextArraySecI
- type TaskProgressU64ArrayAttrI
- type TaskProgressU64ArrayAttrsReadI
- type TaskProgressU64ArrayMembsReadI
- type TaskProgressU64ArraySecI
Constants ¶
This section is empty.
Variables ¶
var PackageProps = packageprops.Props{ WASMWASI: packageprops.WASMBlocked, WASMJS: packageprops.WASMBlocked, WASMFreestanding: packageprops.WASMBlocked, }
PackageProps records this package's curated properties (ADR-0080). Seeded by `wasmsurvey props generate`; curate by hand, then `wasmsurvey props verify`.
var TaskProgressActiveFields = sync.OnceValue(func() []int { active := map[string]bool{"f64Array": true, "i64Array": true, "stringArray": true, "symbol": true, "textArray": true, "u64Array": true} schema := cbdml.CreateSchemaFacts() out := make([]int, 0, 4+len(active)*8) for i, f := range schema.Fields() { name := f.Name switch { case strings.HasPrefix(name, "id:"), strings.HasPrefix(name, "ts:"), strings.HasPrefix(name, "lc:"): out = append(out, i) case strings.HasPrefix(name, "tv:"): rest := name[3:] colon := strings.IndexByte(rest, ':') if colon < 0 { continue } if active[rest[:colon]] { out = append(out, i) } } } return out })
TaskProgressActiveFields is the column-index subset this kind populates in the runtime.facts Arrow schema. Lazily computed once via sync.OnceValue: scans cbdml.CreateSchemaFacts()'s tv:<section>:... field names against this kind's active sections plus the three plain prefixes (id:, ts:, lc:). Driven through RecordBuilder. SetActiveFields to skip per-row emit walks for unused columns.
var TaskProgressActiveSections = []int{3, 7, 9, 10, 12, 18}
TaskProgressActiveSections is the dml_cbor section-index subset this kind populates. Passed to InEntityFacts.SetActiveSections so the builder skips beginSection list-slot work for inactive sections.
Functions ¶
func TaskProgressBuildEntities ¶
func TaskProgressBuildEntities[ StringArrayAttr TaskProgressStringArrayAttrI, StringArraySec TaskProgressStringArraySecI[StringArrayAttr, Ent], U64ArrayAttr TaskProgressU64ArrayAttrI, U64ArraySec TaskProgressU64ArraySecI[U64ArrayAttr, Ent], SymbolAttr TaskProgressSymbolAttrI, SymbolSec TaskProgressSymbolSecI[SymbolAttr, Ent], F64ArrayAttr TaskProgressF64ArrayAttrI, F64ArraySec TaskProgressF64ArraySecI[F64ArrayAttr, Ent], I64ArrayAttr TaskProgressI64ArrayAttrI, I64ArraySec TaskProgressI64ArraySecI[I64ArrayAttr, Ent], TextArrayAttr TaskProgressTextArrayAttrI, TextArraySec TaskProgressTextArraySecI[TextArrayAttr, Ent], Ent any, DML TaskProgressEntityI[ StringArrayAttr, StringArraySec, U64ArrayAttr, U64ArraySec, SymbolAttr, SymbolSec, F64ArrayAttr, F64ArraySec, I64ArrayAttr, I64ArraySec, TextArrayAttr, TextArraySec, Ent, ], ](dml DML, c *TaskProgressColumns) (err error)
TaskProgressBuildEntities walks c row-by-row, drives dml's entity / section chain, and returns once every row has been committed. The dml argument's concrete type binds every type parameter via Go's type inference at the call site.
func TaskProgressFillFromArrow ¶
func TaskProgressFillFromArrow[ StringArrayAttrs TaskProgressStringArrayAttrsReadI, StringArrayMembs TaskProgressStringArrayMembsReadI, U64ArrayAttrs TaskProgressU64ArrayAttrsReadI, U64ArrayMembs TaskProgressU64ArrayMembsReadI, SymbolAttrs TaskProgressSymbolAttrsReadI, SymbolMembs TaskProgressSymbolMembsReadI, F64ArrayAttrs TaskProgressF64ArrayAttrsReadI, F64ArrayMembs TaskProgressF64ArrayMembsReadI, I64ArrayAttrs TaskProgressI64ArrayAttrsReadI, I64ArrayMembs TaskProgressI64ArrayMembsReadI, TextArrayAttrs TaskProgressTextArrayAttrsReadI, TextArrayMembs TaskProgressTextArrayMembsReadI, ]( c *TaskProgressColumns, n int, idCol *array.Uint64, nkCol *array.Binary, tsCol *array.Timestamp, stringArrayAttrs StringArrayAttrs, stringArrayMembs StringArrayMembs, u64ArrayAttrs U64ArrayAttrs, u64ArrayMembs U64ArrayMembs, symbolAttrs SymbolAttrs, symbolMembs SymbolMembs, f64ArrayAttrs F64ArrayAttrs, f64ArrayMembs F64ArrayMembs, i64ArrayAttrs I64ArrayAttrs, i64ArrayMembs I64ArrayMembs, textArrayAttrs TextArrayAttrs, textArrayMembs TextArrayMembs, ) (err error)
TaskProgressFillFromArrow walks rec row-by-row and appends each entity's plain + tagged-section values into c. Plain columns enter as concrete Arrow accessors; per-section Attrs + Membs bind through type-parameter interfaces.
Types ¶
type TaskProgressCodec ¶
type TaskProgressCodec struct{}
TaskProgressCodec is the buscodec.CodecI bridge for TaskProgress. Encodes one row through dml_cbor; decodes via cborarrow.Convert + ra-Unmarshal + Row(0). Auto-registered in init() so callers using buscodec.Encode / Decode route through here instead of the CBOR fallback.
func (*TaskProgressCodec) ContentType ¶
func (inst *TaskProgressCodec) ContentType() (ct string)
func (*TaskProgressCodec) Decode ¶
func (inst *TaskProgressCodec) Decode(b []byte, v any) (err error)
func (*TaskProgressCodec) Encode ¶
func (inst *TaskProgressCodec) Encode(v any) (b []byte, err error)
func (*TaskProgressCodec) Name ¶
func (inst *TaskProgressCodec) Name() (n string)
type TaskProgressColumns ¶
type TaskProgressColumns struct {
FactId []uint64
NaturalKey [][]byte
At []time.Time
TaskId []string
Current []uint64
Total []uint64
Unit []string
ThroughputPerSec []float64
EtaMs []int64
Note []string
}
TaskProgressColumns is the SoA storage for batches of TaskProgress rows. All slices grow in lockstep — Len returns the row count.
func (*TaskProgressColumns) Append ¶
func (c *TaskProgressColumns) Append(row TaskProgress)
Append pushes one AoS record into the SoA buffers.
Aliasing: slice and pointer fields (`[]T`, `*roaring.Bitmap`) are stored by reference, not copied. Callers must not mutate row.<F> after Append unless they want Marshal to read the mutation. Scalar fields (T, Option[T]) are copied by value.
func (*TaskProgressColumns) Len ¶
func (c *TaskProgressColumns) Len() int
Len returns the number of rows currently in the batch.
func (*TaskProgressColumns) Marshal ¶
func (c *TaskProgressColumns) Marshal(w io.Writer) (err error)
Marshal writes the SoA buffer to w as the sparse-CBOR wire format produced through factsschema/dml_cbor. Thin wrapper around TaskProgressBuildEntities — the per-row chain lives there and works against any leeway-DML class that structurally satisfies TaskProgressEntityI.
func (*TaskProgressColumns) Row ¶
func (c *TaskProgressColumns) Row(i int) (row TaskProgress)
Row reconstructs entity i as an AoS TaskProgress record. Inverse of Append: slice / pointer fields are shared by reference (no defensive copy); scalar fields and Option[T] are copied.
func (*TaskProgressColumns) Unmarshal ¶
func (c *TaskProgressColumns) Unmarshal(rec arrow.Record) (err error)
Unmarshal appends one row to c per entity in rec, projecting the runtime.facts columns through factsschema/ra. Thin wrapper around TaskProgressFillFromArrow — the per-row decode lives there.
type TaskProgressEntityI ¶
type TaskProgressEntityI[ StringArrayAttr TaskProgressStringArrayAttrI, StringArraySec TaskProgressStringArraySecI[StringArrayAttr, Ent], U64ArrayAttr TaskProgressU64ArrayAttrI, U64ArraySec TaskProgressU64ArraySecI[U64ArrayAttr, Ent], SymbolAttr TaskProgressSymbolAttrI, SymbolSec TaskProgressSymbolSecI[SymbolAttr, Ent], F64ArrayAttr TaskProgressF64ArrayAttrI, F64ArraySec TaskProgressF64ArraySecI[F64ArrayAttr, Ent], I64ArrayAttr TaskProgressI64ArrayAttrI, I64ArraySec TaskProgressI64ArraySecI[I64ArrayAttr, Ent], TextArrayAttr TaskProgressTextArrayAttrI, TextArraySec TaskProgressTextArraySecI[TextArrayAttr, Ent], Ent any, ] interface { BeginEntity() Ent SetId(id uint64, naturalKey []byte) Ent SetTimestamp(ts time.Time) Ent GetSectionStringArray() StringArraySec GetSectionU64Array() U64ArraySec GetSectionSymbol() SymbolSec GetSectionF64Array() F64ArraySec GetSectionI64Array() I64ArraySec GetSectionTextArray() TextArraySec CommitEntity() (err error) }
TaskProgressEntityI lists exactly the entity-level methods TaskProgress uses. Type parameters compose the per-section Attr + Sec interfaces; Ent is the entity type itself (return type of BeginEntity / SetId / SetTimestamp / SetLifecycle — usually the DML pointer).
type TaskProgressF64ArrayAttrI ¶
type TaskProgressF64ArrayAttrI interface {
dmlruntime.InAttributeMembershipLowCardRefPI
EndAttributeP()
}
TaskProgressF64ArrayAttrI is the InAttr-side view of the f64Array section. P-variants only — every method returns void so no F-bounded `[Self]` parameter is needed.
type TaskProgressF64ArrayAttrsReadI ¶
type TaskProgressF64ArrayAttrsReadI interface {
GetAttrValueSingleOrDefault(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) float64
GetNumberOfAttributes(entityIdx raruntime.EntityIdx) int64
}
TaskProgressF64ArrayAttrsReadI is the Attributes-side view of the f64Array section.
type TaskProgressF64ArrayMembsReadI ¶
type TaskProgressF64ArrayMembsReadI interface {
GetMembValueLowCardRef(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) iter.Seq[uint64]
}
TaskProgressF64ArrayMembsReadI is the Memberships-side view of the f64Array section.
type TaskProgressF64ArraySecI ¶
type TaskProgressF64ArraySecI[Attr any, Ent any] interface { BeginAttributeSingle(value float64) Attr EndSection() Ent }
TaskProgressF64ArraySecI is the Section-side view: opens an attribute and closes the section. Attr and Ent are bound at the call site by inference.
type TaskProgressI64ArrayAttrI ¶
type TaskProgressI64ArrayAttrI interface {
dmlruntime.InAttributeMembershipLowCardRefPI
EndAttributeP()
}
TaskProgressI64ArrayAttrI is the InAttr-side view of the i64Array section. P-variants only — every method returns void so no F-bounded `[Self]` parameter is needed.
type TaskProgressI64ArrayAttrsReadI ¶
type TaskProgressI64ArrayAttrsReadI interface {
GetAttrValueSingleOrDefault(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) int64
GetNumberOfAttributes(entityIdx raruntime.EntityIdx) int64
}
TaskProgressI64ArrayAttrsReadI is the Attributes-side view of the i64Array section.
type TaskProgressI64ArrayMembsReadI ¶
type TaskProgressI64ArrayMembsReadI interface {
GetMembValueLowCardRef(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) iter.Seq[uint64]
}
TaskProgressI64ArrayMembsReadI is the Memberships-side view of the i64Array section.
type TaskProgressI64ArraySecI ¶
type TaskProgressI64ArraySecI[Attr any, Ent any] interface { BeginAttributeSingle(value int64) Attr EndSection() Ent }
TaskProgressI64ArraySecI is the Section-side view: opens an attribute and closes the section. Attr and Ent are bound at the call site by inference.
type TaskProgressStringArrayAttrI ¶
type TaskProgressStringArrayAttrI interface {
dmlruntime.InAttributeMembershipLowCardRefPI
EndAttributeP()
}
TaskProgressStringArrayAttrI is the InAttr-side view of the stringArray section. P-variants only — every method returns void so no F-bounded `[Self]` parameter is needed.
type TaskProgressStringArrayAttrsReadI ¶
type TaskProgressStringArrayAttrsReadI interface {
GetAttrValueSingleOrDefault(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) string
GetNumberOfAttributes(entityIdx raruntime.EntityIdx) int64
}
TaskProgressStringArrayAttrsReadI is the Attributes-side view of the stringArray section.
type TaskProgressStringArrayMembsReadI ¶
type TaskProgressStringArrayMembsReadI interface {
GetMembValueLowCardRef(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) iter.Seq[uint64]
}
TaskProgressStringArrayMembsReadI is the Memberships-side view of the stringArray section.
type TaskProgressStringArraySecI ¶
type TaskProgressStringArraySecI[Attr any, Ent any] interface { BeginAttributeSingle(value string) Attr EndSection() Ent }
TaskProgressStringArraySecI is the Section-side view: opens an attribute and closes the section. Attr and Ent are bound at the call site by inference.
type TaskProgressSymbolAttrI ¶
type TaskProgressSymbolAttrI interface {
dmlruntime.InAttributeMembershipLowCardRefPI
EndAttributeP()
}
TaskProgressSymbolAttrI is the InAttr-side view of the symbol section. P-variants only — every method returns void so no F-bounded `[Self]` parameter is needed.
type TaskProgressSymbolAttrsReadI ¶
type TaskProgressSymbolAttrsReadI interface {
GetAttrValueValue(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) string
GetNumberOfAttributes(entityIdx raruntime.EntityIdx) int64
}
TaskProgressSymbolAttrsReadI is the Attributes-side view of the symbol section.
type TaskProgressSymbolMembsReadI ¶
type TaskProgressSymbolMembsReadI interface {
GetMembValueLowCardRef(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) iter.Seq[uint64]
}
TaskProgressSymbolMembsReadI is the Memberships-side view of the symbol section.
type TaskProgressSymbolSecI ¶
type TaskProgressSymbolSecI[Attr any, Ent any] interface { BeginAttribute(value string) Attr EndSection() Ent }
TaskProgressSymbolSecI is the Section-side view: opens an attribute and closes the section. Attr and Ent are bound at the call site by inference.
type TaskProgressTextArrayAttrI ¶
type TaskProgressTextArrayAttrI interface {
dmlruntime.InAttributeMembershipLowCardRefPI
EndAttributeP()
}
TaskProgressTextArrayAttrI is the InAttr-side view of the textArray section. P-variants only — every method returns void so no F-bounded `[Self]` parameter is needed.
type TaskProgressTextArrayAttrsReadI ¶
type TaskProgressTextArrayAttrsReadI interface {
GetAttrValueSingleOrDefault(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) string
GetNumberOfAttributes(entityIdx raruntime.EntityIdx) int64
}
TaskProgressTextArrayAttrsReadI is the Attributes-side view of the textArray section.
type TaskProgressTextArrayMembsReadI ¶
type TaskProgressTextArrayMembsReadI interface {
GetMembValueLowCardRef(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) iter.Seq[uint64]
}
TaskProgressTextArrayMembsReadI is the Memberships-side view of the textArray section.
type TaskProgressTextArraySecI ¶
type TaskProgressTextArraySecI[Attr any, Ent any] interface { BeginAttributeSingle(value string) Attr EndSection() Ent }
TaskProgressTextArraySecI is the Section-side view: opens an attribute and closes the section. Attr and Ent are bound at the call site by inference.
type TaskProgressU64ArrayAttrI ¶
type TaskProgressU64ArrayAttrI interface {
dmlruntime.InAttributeMembershipLowCardRefPI
EndAttributeP()
}
TaskProgressU64ArrayAttrI is the InAttr-side view of the u64Array section. P-variants only — every method returns void so no F-bounded `[Self]` parameter is needed.
type TaskProgressU64ArrayAttrsReadI ¶
type TaskProgressU64ArrayAttrsReadI interface {
GetAttrValueSingleOrDefault(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) uint64
GetNumberOfAttributes(entityIdx raruntime.EntityIdx) int64
}
TaskProgressU64ArrayAttrsReadI is the Attributes-side view of the u64Array section.
type TaskProgressU64ArrayMembsReadI ¶
type TaskProgressU64ArrayMembsReadI interface {
GetMembValueLowCardRef(entityIdx raruntime.EntityIdx, attrIdx raruntime.AttributeIdx) iter.Seq[uint64]
}
TaskProgressU64ArrayMembsReadI is the Memberships-side view of the u64Array section.
type TaskProgressU64ArraySecI ¶
type TaskProgressU64ArraySecI[Attr any, Ent any] interface { BeginAttributeSingle(value uint64) Attr EndSection() Ent }
TaskProgressU64ArraySecI is the Section-side view: opens an attribute and closes the section. Attr and Ent are bound at the call site by inference.