Documentation
¶
Overview ¶
Package data contains data transmission topics.
Index ¶
- Constants
- Variables
- func GroupFromMessageData(_ bus.Topic, payload any) string
- func IncrFrameEncoded(t bus.Topic)
- func MeasureFrameDecodedCount() int64
- func MeasureFrameEncodedCount() int64
- func MeasureWireModeRaw() bool
- func OperationOf(topic bus.Topic) string
- func SetMeasureWireModeRaw(raw bool)
- func SetStreamWireModeRaw(raw bool)
- func SetTraceWireModeRaw(raw bool)
- func StreamFrameDecodedCount() int64
- func StreamFrameEncodedCount() int64
- func StreamWireModeRaw() bool
- func TraceFrameDecodedCount() int64
- func TraceFrameEncodedCount() int64
- func TraceWireModeRaw() bool
- type ProtoCodec
- type RawFrameCodec
- type ResponseCodec
Constants ¶
const ( // OperationFileSyncValue is the operation label for file-sync (chunked sync) operations. OperationFileSyncValue = "file-sync" // OperationBatchWriteValue is the operation label for batch-write operations. OperationBatchWriteValue = "batch-write" // OperationQueryValue is the operation label for query operations. OperationQueryValue = "query" // OperationControlValue is the operation label for control operations. OperationControlValue = "control" )
const RawFrameMagicLeadingByte byte = 0x00
RawFrameMagicLeadingByte is the mandatory first byte of every raw vec columnar frame body. It is a complete varint tag decoding to field number 0, which protowire.ConsumeTag rejects with errCodeFieldNumber and proto/decode.go converts into a hard errDecode before any unknown-field skip (verified against google.golang.org/protobuf@v1.36.11). Emitting this leading byte deterministically forces a flag-off node's proto.Unmarshal of a raw frame into measurev1.InternalQueryResponse{} to return a non-nil error, collapsing the "garbage-but-parsed silently-empty" outcome into the already-loud decode outcome (G9f spec Principle 3). The full frame magic/wire-version body is produced and consumed by G9f.2/G9f.3; G9f.0 only wires the passthrough plus this contract byte.
Variables ¶
var ( // TopicMap is the map of topic name to topic. TopicMap = map[string]bus.Topic{ TopicStreamWrite.String(): TopicStreamWrite, TopicStreamQuery.String(): TopicStreamQuery, TopicMeasureWrite.String(): TopicMeasureWrite, TopicMeasureQuery.String(): TopicMeasureQuery, TopicInternalMeasureQuery.String(): TopicInternalMeasureQuery, TopicTopNQuery.String(): TopicTopNQuery, TopicPropertyDelete.String(): TopicPropertyDelete, TopicPropertyQuery.String(): TopicPropertyQuery, TopicPropertyUpdate.String(): TopicPropertyUpdate, TopicStreamPartSync.String(): TopicStreamPartSync, TopicMeasurePartSync.String(): TopicMeasurePartSync, TopicMeasureSeriesIndexInsert.String(): TopicMeasureSeriesIndexInsert, TopicMeasureSeriesIndexUpdate.String(): TopicMeasureSeriesIndexUpdate, TopicMeasureSeriesSync.String(): TopicMeasureSeriesSync, TopicPropertyRepair.String(): TopicPropertyRepair, TopicStreamSeriesIndexWrite.String(): TopicStreamSeriesIndexWrite, TopicStreamLocalIndexWrite.String(): TopicStreamLocalIndexWrite, TopicStreamSeriesSync.String(): TopicStreamSeriesSync, TopicStreamElementIndexSync.String(): TopicStreamElementIndexSync, TopicTraceWrite.String(): TopicTraceWrite, TopicTraceQuery.String(): TopicTraceQuery, TopicTracePartSync.String(): TopicTracePartSync, TopicTraceSeriesSync.String(): TopicTraceSeriesSync, TopicTraceSidxSeriesWrite.String(): TopicTraceSidxSeriesWrite, TopicMeasureCollectDataInfo.String(): TopicMeasureCollectDataInfo, TopicMeasureCollectLiaisonInfo.String(): TopicMeasureCollectLiaisonInfo, TopicStreamCollectDataInfo.String(): TopicStreamCollectDataInfo, TopicStreamCollectLiaisonInfo.String(): TopicStreamCollectLiaisonInfo, TopicTraceCollectDataInfo.String(): TopicTraceCollectDataInfo, TopicTraceCollectLiaisonInfo.String(): TopicTraceCollectLiaisonInfo, TopicMeasureDropGroup.String(): TopicMeasureDropGroup, TopicStreamDropGroup.String(): TopicStreamDropGroup, TopicTraceDropGroup.String(): TopicTraceDropGroup, } // TopicRequestMap is the map of topic name to request message. // nolint: exhaustruct TopicRequestMap = map[bus.Topic]func() proto.Message{ TopicStreamWrite: func() proto.Message { return &streamv1.InternalWriteRequest{} }, TopicStreamQuery: func() proto.Message { return &streamv1.QueryRequest{} }, TopicMeasureWrite: func() proto.Message { return &measurev1.InternalWriteRequest{} }, TopicMeasureQuery: func() proto.Message { return &measurev1.QueryRequest{} }, TopicInternalMeasureQuery: func() proto.Message { return &measurev1.InternalQueryRequest{} }, TopicTopNQuery: func() proto.Message { return &measurev1.TopNRequest{} }, TopicPropertyUpdate: func() proto.Message { return &propertyv1.InternalUpdateRequest{} }, TopicPropertyQuery: func() proto.Message { return &propertyv1.QueryRequest{} }, TopicPropertyDelete: func() proto.Message { return &propertyv1.InternalDeleteRequest{} }, TopicStreamPartSync: func() proto.Message { return nil }, TopicMeasurePartSync: func() proto.Message { return nil }, TopicMeasureSeriesIndexInsert: func() proto.Message { return nil }, TopicMeasureSeriesIndexUpdate: func() proto.Message { return nil }, TopicMeasureSeriesSync: func() proto.Message { return nil }, TopicPropertyRepair: func() proto.Message { return &propertyv1.InternalRepairRequest{} }, TopicStreamSeriesIndexWrite: func() proto.Message { return nil }, TopicStreamLocalIndexWrite: func() proto.Message { return nil }, TopicStreamSeriesSync: func() proto.Message { return nil }, TopicStreamElementIndexSync: func() proto.Message { return nil }, TopicTraceWrite: func() proto.Message { return &tracev1.InternalWriteRequest{} }, TopicTraceQuery: func() proto.Message { return &tracev1.QueryRequest{} }, TopicTracePartSync: func() proto.Message { return nil }, TopicTraceSeriesSync: func() proto.Message { return nil }, TopicTraceSidxSeriesWrite: func() proto.Message { return nil }, TopicMeasureCollectDataInfo: func() proto.Message { return &databasev1.GroupRegistryServiceInspectRequest{} }, TopicMeasureCollectLiaisonInfo: func() proto.Message { return &databasev1.GroupRegistryServiceInspectRequest{} }, TopicStreamCollectDataInfo: func() proto.Message { return &databasev1.GroupRegistryServiceInspectRequest{} }, TopicStreamCollectLiaisonInfo: func() proto.Message { return &databasev1.GroupRegistryServiceInspectRequest{} }, TopicTraceCollectDataInfo: func() proto.Message { return &databasev1.GroupRegistryServiceInspectRequest{} }, TopicTraceCollectLiaisonInfo: func() proto.Message { return &databasev1.GroupRegistryServiceInspectRequest{} }, TopicMeasureDropGroup: func() proto.Message { return &databasev1.GroupRegistryServiceDeleteRequest{} }, TopicStreamDropGroup: func() proto.Message { return &databasev1.GroupRegistryServiceDeleteRequest{} }, TopicTraceDropGroup: func() proto.Message { return &databasev1.GroupRegistryServiceDeleteRequest{} }, } // TopicResponseMap is the map of topic name to per-topic response codec. // Every proto-bodied topic is wrapped in a behavior-preserving ProtoCodec // (byte-identical to the pre-G9f.0 proto.Marshal/proto.Unmarshal path). // TopicInternalMeasureQuery uses a wire-mode-dispatching codec: flag-on // processes encode/decode the raw vec columnar frame via RawFrameCodec, // flag-off processes keep the proto body via ProtoCodec (one static // supplier serves both modes on the same topic — topic-AND-process-wire- // mode selection, G9f spec G9f.0). // nolint: exhaustruct TopicResponseMap = map[bus.Topic]ResponseCodec{ TopicStreamQuery: &streamQueryResponseCodec{ proto: NewProtoCodec(func() proto.Message { return &streamv1.QueryResponse{} }), raw: NewRawFrameCodec(), }, TopicMeasureQuery: NewProtoCodec(func() proto.Message { return &measurev1.QueryResponse{} }), TopicInternalMeasureQuery: &measureQueryResponseCodec{ proto: NewProtoCodec(func() proto.Message { return &measurev1.InternalQueryResponse{} }), raw: NewRawFrameCodec(), }, TopicTopNQuery: NewProtoCodec(func() proto.Message { return &measurev1.TopNResponse{} }), TopicPropertyQuery: NewProtoCodec(func() proto.Message { return &propertyv1.InternalQueryResponse{} }), TopicPropertyDelete: NewProtoCodec(func() proto.Message { return &propertyv1.DeleteResponse{} }), TopicPropertyUpdate: NewProtoCodec(func() proto.Message { return &propertyv1.ApplyResponse{} }), TopicPropertyRepair: NewProtoCodec(func() proto.Message { return &propertyv1.InternalRepairResponse{} }), TopicTraceQuery: &traceQueryResponseCodec{ proto: NewProtoCodec(func() proto.Message { return &tracev1.InternalQueryResponse{} }), raw: NewRawFrameCodec(), }, TopicMeasureCollectDataInfo: NewProtoCodec(func() proto.Message { return &databasev1.DataInfo{} }), TopicStreamCollectDataInfo: NewProtoCodec(func() proto.Message { return &databasev1.DataInfo{} }), TopicTraceCollectDataInfo: NewProtoCodec(func() proto.Message { return &databasev1.DataInfo{} }), TopicMeasureCollectLiaisonInfo: NewProtoCodec(func() proto.Message { return &databasev1.LiaisonInfo{} }), TopicStreamCollectLiaisonInfo: NewProtoCodec(func() proto.Message { return &databasev1.LiaisonInfo{} }), TopicTraceCollectLiaisonInfo: NewProtoCodec(func() proto.Message { return &databasev1.LiaisonInfo{} }), TopicMeasureDropGroup: NewProtoCodec(func() proto.Message { return &databasev1.GroupRegistryServiceDeleteRequest{} }), TopicStreamDropGroup: NewProtoCodec(func() proto.Message { return &databasev1.GroupRegistryServiceDeleteRequest{} }), TopicTraceDropGroup: NewProtoCodec(func() proto.Message { return &databasev1.GroupRegistryServiceDeleteRequest{} }), } // TopicCommon is the common topic for data transmission. TopicCommon = bus.Topic{} )
var InternalMeasureQueryKindVersion = common.KindVersion{
Version: "v1",
Kind: "internal-measure-query",
}
InternalMeasureQueryKindVersion is the version tag of internal measure query kind.
var MeasureDeleteExpiredSegmentsKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-delete-expired-segments",
}
MeasureDeleteExpiredSegmentsKindVersion is the version tag of measure delete kind.
var MeasurePartSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-part-sync",
}
MeasurePartSyncKindVersion is the version tag of measure part sync kind.
var MeasureQueryKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-query",
}
MeasureQueryKindVersion is the version tag of measure query kind.
var MeasureSeriesIndexInsertKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-series-index-insert",
}
MeasureSeriesIndexInsertKindVersion is the version tag of measure series index insert kind.
var MeasureSeriesIndexUpdateKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-series-index-update",
}
MeasureSeriesIndexUpdateKindVersion is the version tag of measure series index update kind.
var MeasureSeriesSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-series-sync",
}
MeasureSeriesSyncKindVersion is the version tag of measure series sync kind.
var MeasureWriteKindVersion = common.KindVersion{
Version: "v1",
Kind: "measure-write",
}
MeasureWriteKindVersion is the version tag of measure write kind.
var PropertyDeleteKindVersion = common.KindVersion{
Version: "v1",
Kind: "property-delete",
}
PropertyDeleteKindVersion is the version tag of property delete kind.
var PropertyQueryKindVersion = common.KindVersion{
Version: "v1",
Kind: "property-query",
}
PropertyQueryKindVersion is the version tag of property query kind.
var PropertyRepairKindVersion = common.KindVersion{
Version: "v1",
Kind: "property-repair",
}
PropertyRepairKindVersion is the version tag of property repair kind.
var PropertyUpdateKindVersion = common.KindVersion{
Version: "v1",
Kind: "property-update",
}
PropertyUpdateKindVersion is the version tag of property update kind.
var SnapshotKindVersion = common.KindVersion{
Version: "v1",
Kind: "snapshot",
}
SnapshotKindVersion is the version tag of snapshot kind.
var StreamDeleteExpiredSegmentsKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-delete-expired-segments",
}
StreamDeleteExpiredSegmentsKindVersion is the version tag of stream delete segments kind.
var StreamElementIndexSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-element-index-sync",
}
StreamElementIndexSyncKindVersion is the version tag of element index sync kind.
var StreamLocalIndexWriteKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-local-index-write",
}
StreamLocalIndexWriteKindVersion is the version tag of stream local index write kind.
var StreamPartSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-part-sync",
}
StreamPartSyncKindVersion is the version tag of part sync kind.
var StreamQueryKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-query",
}
StreamQueryKindVersion is the version tag of stream query kind.
var StreamSeriesIndexWriteKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-series-index-write",
}
StreamSeriesIndexWriteKindVersion is the version tag of stream series index write kind.
var StreamSeriesSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-series-sync",
}
StreamSeriesSyncKindVersion is the version tag of series sync kind.
var StreamWriteKindVersion = common.KindVersion{
Version: "v1",
Kind: "stream-write",
}
StreamWriteKindVersion is the version tag of stream write kind.
var TopNQueryKindVersion = common.KindVersion{
Version: "v1",
Kind: "topN-query",
}
TopNQueryKindVersion is the version tag of top-n query kind.
var TopicDeleteExpiredStreamSegments = bus.BiTopic(StreamDeleteExpiredSegmentsKindVersion.String())
TopicDeleteExpiredStreamSegments is the delete stream segments topic.
var TopicDeleteExpiredTraceSegments = bus.BiTopic(TraceDeleteExpiredSegmentsKindVersion.String())
TopicDeleteExpiredTraceSegments is the delete trace segments topic.
var TopicInternalMeasureQuery = bus.BiTopic(InternalMeasureQueryKindVersion.String())
TopicInternalMeasureQuery is the internal measure query topic. Used for distributed query with shard information.
var TopicMeasureCollectDataInfo = bus.BiTopic("measure-collect-data-info")
TopicMeasureCollectDataInfo is the topic for collecting data info from data nodes.
var TopicMeasureCollectLiaisonInfo = bus.BiTopic("measure-collect-liaison-info")
TopicMeasureCollectLiaisonInfo is the topic for collecting liaison info from liaison nodes.
var TopicMeasureDeleteExpiredSegments = bus.BiTopic(MeasureDeleteExpiredSegmentsKindVersion.String())
TopicMeasureDeleteExpiredSegments is the measure delete topic.
var TopicMeasureDropGroup = bus.BiTopic("measure-drop-group")
TopicMeasureDropGroup is the topic for dropping group data files.
var TopicMeasurePartSync = bus.BiTopic(MeasurePartSyncKindVersion.String())
TopicMeasurePartSync is the measure part sync topic.
var TopicMeasureQuery = bus.BiTopic(MeasureQueryKindVersion.String())
TopicMeasureQuery is the measure query topic.
var TopicMeasureSeriesIndexInsert = bus.BiTopic(MeasureSeriesIndexInsertKindVersion.String())
TopicMeasureSeriesIndexInsert is the measure series index insert topic.
var TopicMeasureSeriesIndexUpdate = bus.BiTopic(MeasureSeriesIndexUpdateKindVersion.String())
TopicMeasureSeriesIndexUpdate is the measure series index update topic.
var TopicMeasureSeriesSync = bus.BiTopic(MeasureSeriesSyncKindVersion.String())
TopicMeasureSeriesSync is the measure series sync topic.
var TopicMeasureWrite = bus.BiTopic(MeasureWriteKindVersion.String())
TopicMeasureWrite is the measure write topic.
var TopicPropertyDelete = bus.BiTopic(PropertyDeleteKindVersion.String())
TopicPropertyDelete is the property update topic.
var TopicPropertyQuery = bus.BiTopic(PropertyQueryKindVersion.String())
TopicPropertyQuery is the property query topic.
var TopicPropertyRepair = bus.BiTopic(PropertyRepairKindVersion.String())
TopicPropertyRepair is the property repair topic.
var TopicPropertyUpdate = bus.BiTopic(PropertyUpdateKindVersion.String())
TopicPropertyUpdate is the property update topic.
var TopicSnapshot = bus.BiTopic(SnapshotKindVersion.String())
TopicSnapshot is the snapshot topic.
var TopicStreamCollectDataInfo = bus.BiTopic("stream-collect-data-info")
TopicStreamCollectDataInfo is the topic for collecting data info from data nodes.
var TopicStreamCollectLiaisonInfo = bus.BiTopic("stream-collect-liaison-info")
TopicStreamCollectLiaisonInfo is the topic for collecting liaison info from liaison nodes.
var TopicStreamDropGroup = bus.BiTopic("stream-drop-group")
TopicStreamDropGroup is the topic for dropping group data files.
var TopicStreamElementIndexSync = bus.BiTopic(StreamElementIndexSyncKindVersion.String())
TopicStreamElementIndexSync is the element index sync topic.
var TopicStreamLocalIndexWrite = bus.BiTopic(StreamLocalIndexWriteKindVersion.String())
TopicStreamLocalIndexWrite is the stream local index write topic.
var TopicStreamPartSync = bus.BiTopic(StreamPartSyncKindVersion.String())
TopicStreamPartSync is the part sync topic.
var TopicStreamQuery = bus.BiTopic(StreamQueryKindVersion.String())
TopicStreamQuery is the stream query topic.
var TopicStreamSeriesIndexWrite = bus.BiTopic(StreamSeriesIndexWriteKindVersion.String())
TopicStreamSeriesIndexWrite is the stream series index write topic.
var TopicStreamSeriesSync = bus.BiTopic(StreamSeriesSyncKindVersion.String())
TopicStreamSeriesSync is the series sync topic.
var TopicStreamWrite = bus.BiTopic(StreamWriteKindVersion.String())
TopicStreamWrite is the stream write topic.
var TopicTopNQuery = bus.BiTopic(TopNQueryKindVersion.String())
TopicTopNQuery is the top-n query topic.
var TopicTraceCollectDataInfo = bus.BiTopic("trace-collect-data-info")
TopicTraceCollectDataInfo is the topic for collecting data info from data nodes.
var TopicTraceCollectLiaisonInfo = bus.BiTopic("trace-collect-liaison-info")
TopicTraceCollectLiaisonInfo is the topic for collecting liaison info from liaison nodes.
var TopicTraceDropGroup = bus.BiTopic("trace-drop-group")
TopicTraceDropGroup is the topic for dropping group data files.
var TopicTracePartSync = bus.BiTopic(TracePartSyncKindVersion.String())
TopicTracePartSync is the part sync topic.
var TopicTraceQuery = bus.BiTopic(TraceQueryKindVersion.String())
TopicTraceQuery is the trace query topic.
var TopicTraceSeriesSync = bus.BiTopic(TraceSeriesSyncKindVersion.String())
TopicTraceSeriesSync is the series sync topic.
var TopicTraceSidxSeriesWrite = bus.BiTopic(TraceSidxSeriesWriteKindVersion.String())
TopicTraceSidxSeriesWrite is the trace sidx series write topic.
var TopicTraceWrite = bus.BiTopic(TraceWriteKindVersion.String())
TopicTraceWrite is the trace write topic.
var TraceDeleteExpiredSegmentsKindVersion = common.KindVersion{
Version: "v1",
Kind: "trace-delete-expired-segments",
}
TraceDeleteExpiredSegmentsKindVersion is the version tag of trace delete segments kind.
var TracePartSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "trace-part-sync",
}
TracePartSyncKindVersion is the version tag of part sync kind.
var TraceQueryKindVersion = common.KindVersion{
Version: "v1",
Kind: "trace-query",
}
TraceQueryKindVersion is the version tag of trace query kind.
var TraceSeriesSyncKindVersion = common.KindVersion{
Version: "v1",
Kind: "trace-series-sync",
}
TraceSeriesSyncKindVersion is the version tag of series sync kind.
var TraceSidxSeriesWriteKindVersion = common.KindVersion{
Version: "v1",
Kind: "trace-sidx-series-write",
}
TraceSidxSeriesWriteKindVersion is the version tag of trace sidx series write kind.
var TraceWriteKindVersion = common.KindVersion{
Version: "v1",
Kind: "trace-write",
}
TraceWriteKindVersion is the version tag of trace write kind.
Functions ¶
func GroupFromMessageData ¶ added in v0.11.0
GroupFromMessageData extracts the business group string from the pre-marshal request proto (pub side).
func IncrFrameEncoded ¶ added in v0.11.0
IncrFrameEncoded records that a native columnar frame body for this topic was put on the wire. It is called from the queue's response-marshal path rather than from a codec: the per-topic ResponseCodec.Marshal methods are only reached by in-process callers, while the real data-node send path hands the already encoded []byte straight to the transport, so counting at the codec would report zero frames on a cluster that is in fact emitting them.
func MeasureFrameDecodedCount ¶ added in v0.11.0
func MeasureFrameDecodedCount() int64
MeasureFrameDecodedCount returns how many measure responses this process has decoded from a native columnar frame rather than protobuf.
func MeasureFrameEncodedCount ¶ added in v0.11.0
func MeasureFrameEncodedCount() int64
MeasureFrameEncodedCount returns how many measure responses this process has emitted as a native columnar frame rather than protobuf.
func MeasureWireModeRaw ¶ added in v0.11.0
func MeasureWireModeRaw() bool
MeasureWireModeRaw reports whether this process is flag-on (raw vec frame body) for TopicInternalMeasureQuery.
func OperationOf ¶ added in v0.11.0
OperationOf returns the operation label string for the given bus topic.
func SetMeasureWireModeRaw ¶ added in v0.11.0
func SetMeasureWireModeRaw(raw bool)
SetMeasureWireModeRaw publishes the per-process wire mode for TopicInternalMeasureQuery. raw==true selects RawFrameCodec (flag-on, vec columnar frame body); raw==false selects ProtoCodec (flag-off, proto body). Called at measure-service startup after flags are parsed.
func SetStreamWireModeRaw ¶ added in v0.11.0
func SetStreamWireModeRaw(raw bool)
SetStreamWireModeRaw publishes the per-process wire mode for TopicStreamQuery.
func SetTraceWireModeRaw ¶ added in v0.11.0
func SetTraceWireModeRaw(raw bool)
SetTraceWireModeRaw publishes the per-process wire mode for TopicTraceQuery.
func StreamFrameDecodedCount ¶ added in v0.11.0
func StreamFrameDecodedCount() int64
StreamFrameDecodedCount returns how many stream responses this process has decoded from a native columnar frame rather than protobuf.
func StreamFrameEncodedCount ¶ added in v0.11.0
func StreamFrameEncodedCount() int64
StreamFrameEncodedCount returns how many stream responses this process has emitted as a native columnar frame rather than protobuf.
func StreamWireModeRaw ¶ added in v0.11.0
func StreamWireModeRaw() bool
StreamWireModeRaw reports whether this process emits/decodes native stream frame bodies for TopicStreamQuery.
func TraceFrameDecodedCount ¶ added in v0.11.0
func TraceFrameDecodedCount() int64
TraceFrameDecodedCount returns how many trace responses this process has decoded from a native columnar frame rather than protobuf.
func TraceFrameEncodedCount ¶ added in v0.11.0
func TraceFrameEncodedCount() int64
TraceFrameEncodedCount returns how many trace responses this process has emitted as a native columnar frame rather than protobuf.
func TraceWireModeRaw ¶ added in v0.11.0
func TraceWireModeRaw() bool
TraceWireModeRaw reports whether this process emits/decodes native trace frame bodies for TopicTraceQuery.
Types ¶
type ProtoCodec ¶ added in v0.11.0
type ProtoCodec struct {
// contains filtered or unexported fields
}
ProtoCodec is the behavior-preserving codec for every proto-bodied topic. It marshals and unmarshals byte-identically to the pre-G9f.0 proto.Marshal/proto.Unmarshal path: Marshal calls proto.Marshal on the supplied proto.Message; Unmarshal allocates a fresh message via the supplier and proto.Unmarshal-s into it.
func NewProtoCodec ¶ added in v0.11.0
func NewProtoCodec(newMessage func() proto.Message) *ProtoCodec
NewProtoCodec wraps a proto message supplier in a ProtoCodec.
type RawFrameCodec ¶ added in v0.11.0
type RawFrameCodec struct{}
RawFrameCodec passes the SendResponse.body through as opaque bytes — the future vec columnar frame. It applies no proto encoding. A nil/empty body is a legitimate empty distributed result and is NOT magic-validated (sub.go sends a body-less SendResponse for an empty result and pub.go returns before codec dispatch on a nil body — magic-validating those legitimate empties would fail loud incorrectly). A non-empty body MUST begin with RawFrameMagicLeadingByte; the full magic/wire-version validation lands in G9f.3, but the leading-byte contract is enforced here so the G9f.0 passthrough is the SOLE place the contract is asserted on decode.
func NewRawFrameCodec ¶ added in v0.11.0
func NewRawFrameCodec() *RawFrameCodec
NewRawFrameCodec returns the opaque-bytes passthrough codec.
func (*RawFrameCodec) Marshal ¶ added in v0.11.0
func (c *RawFrameCodec) Marshal(v any) ([]byte, error)
Marshal returns the raw frame bytes unchanged. A nil/empty value encodes to a nil body (a legitimate empty distributed result).
func (*RawFrameCodec) Unmarshal ¶ added in v0.11.0
func (c *RawFrameCodec) Unmarshal(body []byte) (any, error)
Unmarshal returns the raw frame bytes unchanged. A nil/empty body is a valid empty result and is NOT magic-validated. A non-empty body MUST begin with RawFrameMagicLeadingByte or it fails loud.
type ResponseCodec ¶ added in v0.11.0
type ResponseCodec interface {
// Marshal encodes a response value into the SendResponse.body bytes.
Marshal(any) ([]byte, error)
// Unmarshal decodes the SendResponse.body bytes into a response value.
Unmarshal([]byte) (any, error)
}
ResponseCodec encodes and decodes the clusterv1.SendResponse.body for a single topic. The ~18 proto topics use a behavior-preserving ProtoCodec; TopicInternalMeasureQuery uses a wire-mode-dispatching codec that selects RawFrameCodec when the process is flag-on and ProtoCodec when flag-off (topic-AND-process-wire-mode selection — one static supplier serves both flag-on raw bodies and flag-off proto bodies on the same topic).