// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies // @generated from protobuf file "parca/profilestore/v1alpha1/profilestore.proto" (package "parca.profilestore.v1alpha1", syntax proto3) // tslint:disable import { ServiceType } from "@protobuf-ts/runtime-rpc"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import { WireType } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Duration } from "../../../google/protobuf/duration"; import { Timestamp } from "../../../google/protobuf/timestamp"; /** * WriteRequest may contain an apache arrow record that only contains profiling * samples with a reference to a stacktrace ID, or a full stacktrace. If it * only contains samples, the server may request the full stacktrace from the * client should it not already know them. * * @generated from protobuf message parca.profilestore.v1alpha1.WriteRequest */ export interface WriteRequest { /** * The bytes containing the arrow record. * * @generated from protobuf field: bytes record = 1 */ record: Uint8Array; } /** * WriteResponse may be empty if the server doesn't need any further * information, or contain an arrow record that contains the stacktrace IDs * that are unknown and therefore requested by the client from the server. * * @generated from protobuf message parca.profilestore.v1alpha1.WriteResponse */ export interface WriteResponse { /** * When record is non-empty it contains the bytes of an arrow record that * contains a column containing the stacktraces that are unknown. * * @generated from protobuf field: bytes record = 1 */ record: Uint8Array; } /** * WriteArrowRequest is the request containing an arrow IPC buffer. * * @generated from protobuf message parca.profilestore.v1alpha1.WriteArrowRequest */ export interface WriteArrowRequest { /** * ipc_buffer is the raw bytes of an arrow IPC file. * * @generated from protobuf field: bytes ipc_buffer = 1 */ ipcBuffer: Uint8Array; } /** * WriteArrowResponse is the response for the WriteArrow RPC. * * @generated from protobuf message parca.profilestore.v1alpha1.WriteArrowResponse */ export interface WriteArrowResponse { } /** * WriteRawRequest writes a pprof profile for a given tenant * * @generated from protobuf message parca.profilestore.v1alpha1.WriteRawRequest */ export interface WriteRawRequest { /** * tenant is the given tenant to store the pprof profile under * * @deprecated * @generated from protobuf field: string tenant = 1 [deprecated = true] */ tenant: string; /** * series is a set raw pprof profiles and accompanying labels * * @generated from protobuf field: repeated parca.profilestore.v1alpha1.RawProfileSeries series = 2 */ series: RawProfileSeries[]; /** * normalized is a flag indicating if the addresses in the profile is normalized for position independent code * * @generated from protobuf field: bool normalized = 3 */ normalized: boolean; } /** * WriteRawResponse is the empty response * * @generated from protobuf message parca.profilestore.v1alpha1.WriteRawResponse */ export interface WriteRawResponse { } /** * RawProfileSeries represents the pprof profile and its associated labels * * @generated from protobuf message parca.profilestore.v1alpha1.RawProfileSeries */ export interface RawProfileSeries { /** * LabelSet is the key value pairs to identify the corresponding profile * * @generated from protobuf field: parca.profilestore.v1alpha1.LabelSet labels = 1 */ labels?: LabelSet; /** * samples are the set of profile bytes * * @generated from protobuf field: repeated parca.profilestore.v1alpha1.RawSample samples = 2 */ samples: RawSample[]; } /** * Label is a key value pair of identifiers * * @generated from protobuf message parca.profilestore.v1alpha1.Label */ export interface Label { /** * name is the label name * * @generated from protobuf field: string name = 1 */ name: string; /** * value is the value for the label name * * @generated from protobuf field: string value = 2 */ value: string; } /** * LabelSet is a group of labels * * @generated from protobuf message parca.profilestore.v1alpha1.LabelSet */ export interface LabelSet { /** * labels are the grouping of labels * * @generated from protobuf field: repeated parca.profilestore.v1alpha1.Label labels = 1 */ labels: Label[]; } /** * RawSample is the set of bytes that correspond to a pprof profile * * @generated from protobuf message parca.profilestore.v1alpha1.RawSample */ export interface RawSample { /** * raw_profile is the set of bytes of the pprof profile * * @generated from protobuf field: bytes raw_profile = 1 */ rawProfile: Uint8Array; /** * information about the executable and executable section for normalizaton * purposes. * * @generated from protobuf field: repeated parca.profilestore.v1alpha1.ExecutableInfo executable_info = 2 */ executableInfo: ExecutableInfo[]; } /** * ExecutableInfo is the information about the executable and executable * section for normalizaton purposes before symbolization. * * @generated from protobuf message parca.profilestore.v1alpha1.ExecutableInfo */ export interface ExecutableInfo { /** * elf_type is the type of the elf executable. Technically the elf type is a * 16 bit integer, but protobuf's smallest unsigned integer is 32 bits. * * @generated from protobuf field: uint32 elf_type = 1 */ elfType: number; /** * load_segment is the load segment of the executable. * * @generated from protobuf field: parca.profilestore.v1alpha1.LoadSegment load_segment = 2 */ loadSegment?: LoadSegment; } /** * LoadSegment is the load segment of the executable * * @generated from protobuf message parca.profilestore.v1alpha1.LoadSegment */ export interface LoadSegment { /** * The offset from the beginning of the file at which the first byte of the segment resides. * * @generated from protobuf field: uint64 offset = 1 */ offset: bigint; /** * The virtual address at which the first byte of the segment resides in memory. * * @generated from protobuf field: uint64 vaddr = 2 */ vaddr: bigint; } /** * AgentsRequest is the request to retrieve a list of agents * * @generated from protobuf message parca.profilestore.v1alpha1.AgentsRequest */ export interface AgentsRequest { } /** * AgentsResponse is the request to retrieve a list of agents * * @generated from protobuf message parca.profilestore.v1alpha1.AgentsResponse */ export interface AgentsResponse { /** * agents is a list of agents * * @generated from protobuf field: repeated parca.profilestore.v1alpha1.Agent agents = 1 */ agents: Agent[]; } /** * Agent is the agent representation * * @generated from protobuf message parca.profilestore.v1alpha1.Agent */ export interface Agent { /** * id is the agent identity that either represent by the node name or the IP address. * When node name is not found, this will fallback to IP address. * * @generated from protobuf field: string id = 1 */ id: string; /** * last_error is the error message most recently received from a push attempt * * @generated from protobuf field: string last_error = 2 */ lastError: string; /** * last_push is the time stamp the last push request was performed * * @generated from protobuf field: google.protobuf.Timestamp last_push = 3 */ lastPush?: Timestamp; /** * last_push_duration is the duration of the last push request * * @generated from protobuf field: google.protobuf.Duration last_push_duration = 4 */ lastPushDuration?: Duration; } // @generated message type with reflection information, may provide speed optimized methods class WriteRequest$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.WriteRequest", [ { no: 1, name: "record", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } ]); } create(value?: PartialMessage): WriteRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.record = new Uint8Array(0); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteRequest): WriteRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* bytes record */ 1: message.record = reader.bytes(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: WriteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* bytes record = 1; */ if (message.record.length) writer.tag(1, WireType.LengthDelimited).bytes(message.record); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.WriteRequest */ export const WriteRequest = new WriteRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class WriteResponse$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.WriteResponse", [ { no: 1, name: "record", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } ]); } create(value?: PartialMessage): WriteResponse { const message = globalThis.Object.create((this.messagePrototype!)); message.record = new Uint8Array(0); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteResponse): WriteResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* bytes record */ 1: message.record = reader.bytes(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: WriteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* bytes record = 1; */ if (message.record.length) writer.tag(1, WireType.LengthDelimited).bytes(message.record); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.WriteResponse */ export const WriteResponse = new WriteResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class WriteArrowRequest$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.WriteArrowRequest", [ { no: 1, name: "ipc_buffer", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } ]); } create(value?: PartialMessage): WriteArrowRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.ipcBuffer = new Uint8Array(0); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteArrowRequest): WriteArrowRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* bytes ipc_buffer */ 1: message.ipcBuffer = reader.bytes(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: WriteArrowRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* bytes ipc_buffer = 1; */ if (message.ipcBuffer.length) writer.tag(1, WireType.LengthDelimited).bytes(message.ipcBuffer); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.WriteArrowRequest */ export const WriteArrowRequest = new WriteArrowRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class WriteArrowResponse$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.WriteArrowResponse", []); } create(value?: PartialMessage): WriteArrowResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteArrowResponse): WriteArrowResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: WriteArrowResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.WriteArrowResponse */ export const WriteArrowResponse = new WriteArrowResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class WriteRawRequest$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.WriteRawRequest", [ { no: 1, name: "tenant", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "series", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RawProfileSeries }, { no: 3, name: "normalized", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): WriteRawRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.tenant = ""; message.series = []; message.normalized = false; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteRawRequest): WriteRawRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string tenant = 1 [deprecated = true] */ 1: message.tenant = reader.string(); break; case /* repeated parca.profilestore.v1alpha1.RawProfileSeries series */ 2: message.series.push(RawProfileSeries.internalBinaryRead(reader, reader.uint32(), options)); break; case /* bool normalized */ 3: message.normalized = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: WriteRawRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string tenant = 1 [deprecated = true]; */ if (message.tenant !== "") writer.tag(1, WireType.LengthDelimited).string(message.tenant); /* repeated parca.profilestore.v1alpha1.RawProfileSeries series = 2; */ for (let i = 0; i < message.series.length; i++) RawProfileSeries.internalBinaryWrite(message.series[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* bool normalized = 3; */ if (message.normalized !== false) writer.tag(3, WireType.Varint).bool(message.normalized); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.WriteRawRequest */ export const WriteRawRequest = new WriteRawRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class WriteRawResponse$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.WriteRawResponse", []); } create(value?: PartialMessage): WriteRawResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteRawResponse): WriteRawResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: WriteRawResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.WriteRawResponse */ export const WriteRawResponse = new WriteRawResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class RawProfileSeries$Type extends MessageType { constructor() { super("parca.profilestore.v1alpha1.RawProfileSeries", [ { no: 1, name: "labels", kind: "message", T: () => LabelSet }, { no: 2, name: "samples", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RawSample } ]); } create(value?: PartialMessage): RawProfileSeries { const message = globalThis.Object.create((this.messagePrototype!)); message.samples = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RawProfileSeries): RawProfileSeries { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* parca.profilestore.v1alpha1.LabelSet labels */ 1: message.labels = LabelSet.internalBinaryRead(reader, reader.uint32(), options, message.labels); break; case /* repeated parca.profilestore.v1alpha1.RawSample samples */ 2: message.samples.push(RawSample.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: RawProfileSeries, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* parca.profilestore.v1alpha1.LabelSet labels = 1; */ if (message.labels) LabelSet.internalBinaryWrite(message.labels, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* repeated parca.profilestore.v1alpha1.RawSample samples = 2; */ for (let i = 0; i < message.samples.length; i++) RawSample.internalBinaryWrite(message.samples[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message parca.profilestore.v1alpha1.RawProfileSeries */ export const RawProfileSeries = new RawProfileSeries$Type(); // @generated message type with reflection information, may provide speed optimized methods class Label$Type extends MessageType