@parca/client
Advanced tools
Comparing version 0.16.57 to 0.16.58
@@ -6,2 +6,6 @@ # Change Log | ||
## [0.16.58](https://github.com/parca-dev/parca/compare/@parca/client@0.16.57...@parca/client@0.16.58) (2022-12-12) | ||
**Note:** Version bump only for package @parca/client | ||
## 0.16.57 (2022-12-06) | ||
@@ -8,0 +12,0 @@ |
import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; | ||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; | ||
import type { DownloadResponse } from "./debuginfo"; | ||
import type { DownloadRequest } from "./debuginfo"; | ||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc"; | ||
import type { MarkUploadFinishedResponse } from "./debuginfo"; | ||
import type { MarkUploadFinishedRequest } from "./debuginfo"; | ||
import type { InitiateUploadResponse } from "./debuginfo"; | ||
import type { InitiateUploadRequest } from "./debuginfo"; | ||
import type { ShouldInitiateUploadResponse } from "./debuginfo"; | ||
import type { ShouldInitiateUploadRequest } from "./debuginfo"; | ||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; | ||
import type { UploadResponse } from "./debuginfo"; | ||
import type { UploadRequest } from "./debuginfo"; | ||
import type { ClientStreamingCall } from "@protobuf-ts/runtime-rpc"; | ||
import type { ExistsResponse } from "./debuginfo"; | ||
import type { ExistsRequest } from "./debuginfo"; | ||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; | ||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; | ||
/** | ||
* DebugInfoService is a service that allows storage of debug info | ||
* DebuginfoService is a service that allows storage of debug info | ||
* | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export interface IDebugInfoServiceClient { | ||
export interface IDebuginfoServiceClient { | ||
/** | ||
* Exists returns true if the given build_id has debug info uploaded for it. | ||
* | ||
* @generated from protobuf rpc: Exists(parca.debuginfo.v1alpha1.ExistsRequest) returns (parca.debuginfo.v1alpha1.ExistsResponse); | ||
*/ | ||
exists(input: ExistsRequest, options?: RpcOptions): UnaryCall<ExistsRequest, ExistsResponse>; | ||
/** | ||
* Upload ingests debug info for a given build_id | ||
@@ -32,14 +27,26 @@ * | ||
/** | ||
* Download returns the debug info for a given build_id. | ||
* ShouldInitiateUpload returns whether an upload for a given build_id should be initiated or not. | ||
* | ||
* @generated from protobuf rpc: Download(parca.debuginfo.v1alpha1.DownloadRequest) returns (stream parca.debuginfo.v1alpha1.DownloadResponse); | ||
* @generated from protobuf rpc: ShouldInitiateUpload(parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest) returns (parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse); | ||
*/ | ||
download(input: DownloadRequest, options?: RpcOptions): ServerStreamingCall<DownloadRequest, DownloadResponse>; | ||
shouldInitiateUpload(input: ShouldInitiateUploadRequest, options?: RpcOptions): UnaryCall<ShouldInitiateUploadRequest, ShouldInitiateUploadResponse>; | ||
/** | ||
* InitiateUpload returns a strategy and information to upload debug info for a given build_id. | ||
* | ||
* @generated from protobuf rpc: InitiateUpload(parca.debuginfo.v1alpha1.InitiateUploadRequest) returns (parca.debuginfo.v1alpha1.InitiateUploadResponse); | ||
*/ | ||
initiateUpload(input: InitiateUploadRequest, options?: RpcOptions): UnaryCall<InitiateUploadRequest, InitiateUploadResponse>; | ||
/** | ||
* MarkUploadFinished marks the upload as finished for a given build_id. | ||
* | ||
* @generated from protobuf rpc: MarkUploadFinished(parca.debuginfo.v1alpha1.MarkUploadFinishedRequest) returns (parca.debuginfo.v1alpha1.MarkUploadFinishedResponse); | ||
*/ | ||
markUploadFinished(input: MarkUploadFinishedRequest, options?: RpcOptions): UnaryCall<MarkUploadFinishedRequest, MarkUploadFinishedResponse>; | ||
} | ||
/** | ||
* DebugInfoService is a service that allows storage of debug info | ||
* DebuginfoService is a service that allows storage of debug info | ||
* | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export declare class DebugInfoServiceClient implements IDebugInfoServiceClient, ServiceInfo { | ||
export declare class DebuginfoServiceClient implements IDebuginfoServiceClient, ServiceInfo { | ||
private readonly _transport; | ||
@@ -53,8 +60,2 @@ typeName: string; | ||
/** | ||
* Exists returns true if the given build_id has debug info uploaded for it. | ||
* | ||
* @generated from protobuf rpc: Exists(parca.debuginfo.v1alpha1.ExistsRequest) returns (parca.debuginfo.v1alpha1.ExistsResponse); | ||
*/ | ||
exists(input: ExistsRequest, options?: RpcOptions): UnaryCall<ExistsRequest, ExistsResponse>; | ||
/** | ||
* Upload ingests debug info for a given build_id | ||
@@ -66,7 +67,19 @@ * | ||
/** | ||
* Download returns the debug info for a given build_id. | ||
* ShouldInitiateUpload returns whether an upload for a given build_id should be initiated or not. | ||
* | ||
* @generated from protobuf rpc: Download(parca.debuginfo.v1alpha1.DownloadRequest) returns (stream parca.debuginfo.v1alpha1.DownloadResponse); | ||
* @generated from protobuf rpc: ShouldInitiateUpload(parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest) returns (parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse); | ||
*/ | ||
download(input: DownloadRequest, options?: RpcOptions): ServerStreamingCall<DownloadRequest, DownloadResponse>; | ||
shouldInitiateUpload(input: ShouldInitiateUploadRequest, options?: RpcOptions): UnaryCall<ShouldInitiateUploadRequest, ShouldInitiateUploadResponse>; | ||
/** | ||
* InitiateUpload returns a strategy and information to upload debug info for a given build_id. | ||
* | ||
* @generated from protobuf rpc: InitiateUpload(parca.debuginfo.v1alpha1.InitiateUploadRequest) returns (parca.debuginfo.v1alpha1.InitiateUploadResponse); | ||
*/ | ||
initiateUpload(input: InitiateUploadRequest, options?: RpcOptions): UnaryCall<InitiateUploadRequest, InitiateUploadResponse>; | ||
/** | ||
* MarkUploadFinished marks the upload as finished for a given build_id. | ||
* | ||
* @generated from protobuf rpc: MarkUploadFinished(parca.debuginfo.v1alpha1.MarkUploadFinishedRequest) returns (parca.debuginfo.v1alpha1.MarkUploadFinishedResponse); | ||
*/ | ||
markUploadFinished(input: MarkUploadFinishedRequest, options?: RpcOptions): UnaryCall<MarkUploadFinishedRequest, MarkUploadFinishedResponse>; | ||
} |
@@ -1,42 +0,51 @@ | ||
import { DebugInfoService } from "./debuginfo"; | ||
import { DebuginfoService } from "./debuginfo"; | ||
import { stackIntercept } from "@protobuf-ts/runtime-rpc"; | ||
/** | ||
* DebugInfoService is a service that allows storage of debug info | ||
* DebuginfoService is a service that allows storage of debug info | ||
* | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export class DebugInfoServiceClient { | ||
export class DebuginfoServiceClient { | ||
constructor(_transport) { | ||
this._transport = _transport; | ||
this.typeName = DebugInfoService.typeName; | ||
this.methods = DebugInfoService.methods; | ||
this.options = DebugInfoService.options; | ||
this.typeName = DebuginfoService.typeName; | ||
this.methods = DebuginfoService.methods; | ||
this.options = DebuginfoService.options; | ||
} | ||
/** | ||
* Exists returns true if the given build_id has debug info uploaded for it. | ||
* Upload ingests debug info for a given build_id | ||
* | ||
* @generated from protobuf rpc: Exists(parca.debuginfo.v1alpha1.ExistsRequest) returns (parca.debuginfo.v1alpha1.ExistsResponse); | ||
* @generated from protobuf rpc: Upload(stream parca.debuginfo.v1alpha1.UploadRequest) returns (parca.debuginfo.v1alpha1.UploadResponse); | ||
*/ | ||
exists(input, options) { | ||
upload(options) { | ||
const method = this.methods[0], opt = this._transport.mergeOptions(options); | ||
return stackIntercept("unary", this._transport, method, opt, input); | ||
return stackIntercept("clientStreaming", this._transport, method, opt); | ||
} | ||
/** | ||
* Upload ingests debug info for a given build_id | ||
* ShouldInitiateUpload returns whether an upload for a given build_id should be initiated or not. | ||
* | ||
* @generated from protobuf rpc: Upload(stream parca.debuginfo.v1alpha1.UploadRequest) returns (parca.debuginfo.v1alpha1.UploadResponse); | ||
* @generated from protobuf rpc: ShouldInitiateUpload(parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest) returns (parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse); | ||
*/ | ||
upload(options) { | ||
shouldInitiateUpload(input, options) { | ||
const method = this.methods[1], opt = this._transport.mergeOptions(options); | ||
return stackIntercept("clientStreaming", this._transport, method, opt); | ||
return stackIntercept("unary", this._transport, method, opt, input); | ||
} | ||
/** | ||
* Download returns the debug info for a given build_id. | ||
* InitiateUpload returns a strategy and information to upload debug info for a given build_id. | ||
* | ||
* @generated from protobuf rpc: Download(parca.debuginfo.v1alpha1.DownloadRequest) returns (stream parca.debuginfo.v1alpha1.DownloadResponse); | ||
* @generated from protobuf rpc: InitiateUpload(parca.debuginfo.v1alpha1.InitiateUploadRequest) returns (parca.debuginfo.v1alpha1.InitiateUploadResponse); | ||
*/ | ||
download(input, options) { | ||
initiateUpload(input, options) { | ||
const method = this.methods[2], opt = this._transport.mergeOptions(options); | ||
return stackIntercept("serverStreaming", this._transport, method, opt, input); | ||
return stackIntercept("unary", this._transport, method, opt, input); | ||
} | ||
/** | ||
* MarkUploadFinished marks the upload as finished for a given build_id. | ||
* | ||
* @generated from protobuf rpc: MarkUploadFinished(parca.debuginfo.v1alpha1.MarkUploadFinishedRequest) returns (parca.debuginfo.v1alpha1.MarkUploadFinishedResponse); | ||
*/ | ||
markUploadFinished(input, options) { | ||
const method = this.methods[3], opt = this._transport.mergeOptions(options); | ||
return stackIntercept("unary", this._transport, method, opt, input); | ||
} | ||
} |
@@ -8,10 +8,11 @@ import { ServiceType } from "@protobuf-ts/runtime-rpc"; | ||
import { MessageType } from "@protobuf-ts/runtime"; | ||
import { Timestamp } from "../../../google/protobuf/timestamp"; | ||
/** | ||
* ExistsRequest request to determine if debug info exists for a given build_id | ||
* ShouldInitiateUploadRequest is the request for ShouldInitiateUpload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ExistsRequest | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest | ||
*/ | ||
export interface ExistsRequest { | ||
export interface ShouldInitiateUploadRequest { | ||
/** | ||
* build_id is a unique identifier for the debug data | ||
* The build_id of the debuginfo. | ||
* | ||
@@ -22,3 +23,3 @@ * @generated from protobuf field: string build_id = 1; | ||
/** | ||
* hash is the hash of the debug information file | ||
* Hash of the debuginfo to upload. | ||
* | ||
@@ -30,15 +31,142 @@ * @generated from protobuf field: string hash = 2; | ||
/** | ||
* ExistsResponse returns whether the given build_id has debug info | ||
* ShouldInitiateUploadResponse is the response for ShouldInitiateUpload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ExistsResponse | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse | ||
*/ | ||
export interface ExistsResponse { | ||
export interface ShouldInitiateUploadResponse { | ||
/** | ||
* exists indicates if there is debug data present for the given build_id | ||
* Whether an upload should be initiated or not. | ||
* | ||
* @generated from protobuf field: bool exists = 1; | ||
* @generated from protobuf field: bool should_initiate_upload = 1; | ||
*/ | ||
exists: boolean; | ||
shouldInitiateUpload: boolean; | ||
/** | ||
* Reason for why an upload should be initiated or not. | ||
* | ||
* @generated from protobuf field: string reason = 2; | ||
*/ | ||
reason: string; | ||
} | ||
/** | ||
* InitiateUploadRequest is the request to initiate an upload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.InitiateUploadRequest | ||
*/ | ||
export interface InitiateUploadRequest { | ||
/** | ||
* The build_id of the debug info to upload. | ||
* | ||
* @generated from protobuf field: string build_id = 1; | ||
*/ | ||
buildId: string; | ||
/** | ||
* The size of the debug info to upload. | ||
* | ||
* @generated from protobuf field: int64 size = 2; | ||
*/ | ||
size: string; | ||
/** | ||
* Hash of the debuginfo to upload. | ||
* | ||
* @generated from protobuf field: string hash = 3; | ||
*/ | ||
hash: string; | ||
} | ||
/** | ||
* InitiateUploadResponse is the response to an InitiateUploadRequest. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.InitiateUploadResponse | ||
*/ | ||
export interface InitiateUploadResponse { | ||
/** | ||
* UploadInstructions contains the instructions for the client to upload the debuginfo. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.UploadInstructions upload_instructions = 1; | ||
*/ | ||
uploadInstructions?: UploadInstructions; | ||
} | ||
/** | ||
* UploadInstructions contains the instructions for the client to upload debuginfo. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.UploadInstructions | ||
*/ | ||
export interface UploadInstructions { | ||
/** | ||
* The build ID of the debuginfo to upload. | ||
* | ||
* @generated from protobuf field: string build_id = 1; | ||
*/ | ||
buildId: string; | ||
/** | ||
* The upload_id to use for uploading. | ||
* | ||
* @generated from protobuf field: string upload_id = 2; | ||
*/ | ||
uploadId: string; | ||
/** | ||
* The strategy to use for uploading. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy upload_strategy = 3; | ||
*/ | ||
uploadStrategy: UploadInstructions_UploadStrategy; | ||
/** | ||
* The signed url to use for uploading using a PUT request when the upload | ||
* strategy is SIGNED_STRATEGY_URL. | ||
* | ||
* @generated from protobuf field: string signed_url = 4; | ||
*/ | ||
signedUrl: string; | ||
} | ||
/** | ||
* The strategy to use for uploading. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy | ||
*/ | ||
export declare enum UploadInstructions_UploadStrategy { | ||
/** | ||
* The upload is not allowed. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_UNSPECIFIED = 0; | ||
*/ | ||
UNSPECIFIED = 0, | ||
/** | ||
* The upload is allowed and should be done via the Upload RPC. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_GRPC = 1; | ||
*/ | ||
GRPC = 1, | ||
/** | ||
* The upload is allowed and should be done via a returned signed URL. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_SIGNED_URL = 2; | ||
*/ | ||
SIGNED_URL = 2 | ||
} | ||
/** | ||
* MarkUploadFinishedRequest is the request to mark an upload as finished. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedRequest | ||
*/ | ||
export interface MarkUploadFinishedRequest { | ||
/** | ||
* The build_id of the debug info to mark as finished. | ||
* | ||
* @generated from protobuf field: string build_id = 1; | ||
*/ | ||
buildId: string; | ||
/** | ||
* The upload_id of the debug info to mark as finished. | ||
* | ||
* @generated from protobuf field: string upload_id = 2; | ||
*/ | ||
uploadId: string; | ||
} | ||
/** | ||
* MarkUploadFinishedResponse is the response to a MarkUploadFinishedRequest. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedResponse | ||
*/ | ||
export interface MarkUploadFinishedResponse { | ||
} | ||
/** | ||
* UploadRequest upload debug info | ||
@@ -85,7 +213,7 @@ * | ||
/** | ||
* hash is the hash of the source file that debug information extracted from | ||
* upload_id is a unique identifier for the upload | ||
* | ||
* @generated from protobuf field: string hash = 2; | ||
* @generated from protobuf field: string upload_id = 2; | ||
*/ | ||
hash: string; | ||
uploadId: string; | ||
} | ||
@@ -112,9 +240,9 @@ /** | ||
/** | ||
* DownloadRequest upload debug info | ||
* Debuginfo contains metadata about a debuginfo file. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DownloadRequest | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.Debuginfo | ||
*/ | ||
export interface DownloadRequest { | ||
export interface Debuginfo { | ||
/** | ||
* build_id is a unique identifier for the debug data | ||
* BuildID is the build ID of the debuginfo. | ||
* | ||
@@ -124,90 +252,192 @@ * @generated from protobuf field: string build_id = 1; | ||
buildId: string; | ||
/** | ||
* Source is the source of the debuginfo. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.Debuginfo.Source source = 2; | ||
*/ | ||
source: Debuginfo_Source; | ||
/** | ||
* DebuginfoUpload is the debuginfo upload metadata. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DebuginfoUpload upload = 3; | ||
*/ | ||
upload?: DebuginfoUpload; | ||
/** | ||
* Quality is the quality of the debuginfo. This is set asynchonously by the | ||
* symbolizer when the debuginfo is actually used. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DebuginfoQuality quality = 4; | ||
*/ | ||
quality?: DebuginfoQuality; | ||
} | ||
/** | ||
* DownloadRequest returns chunked data of the debuginfo. | ||
* Source is the source of the debuginfo. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DownloadResponse | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.Debuginfo.Source | ||
*/ | ||
export interface DownloadResponse { | ||
export declare enum Debuginfo_Source { | ||
/** | ||
* @generated from protobuf oneof: data | ||
* To understand when no source is set we have the unknown source. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UNKNOWN_UNSPECIFIED = 0; | ||
*/ | ||
data: { | ||
oneofKind: "info"; | ||
/** | ||
* info is the metadata for the debug info | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DownloadInfo info = 1; | ||
*/ | ||
info: DownloadInfo; | ||
} | { | ||
oneofKind: "chunkData"; | ||
/** | ||
* chunk_data is the raw bytes of the debug info | ||
* | ||
* @generated from protobuf field: bytes chunk_data = 2; | ||
*/ | ||
chunkData: Uint8Array; | ||
} | { | ||
oneofKind: undefined; | ||
}; | ||
UNKNOWN_UNSPECIFIED = 0, | ||
/** | ||
* The debuginfo was uploaded by a user/agent. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UPLOAD = 1; | ||
*/ | ||
UPLOAD = 1, | ||
/** | ||
* The debuginfo is available from the configured debuginfod server(s). | ||
* | ||
* @generated from protobuf enum value: SOURCE_DEBUGINFOD = 2; | ||
*/ | ||
DEBUGINFOD = 2 | ||
} | ||
/** | ||
* DownloadInfo metadata for the debug data that is being downloaded. | ||
* DebuginfoUpload contains metadata about a debuginfo upload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DownloadInfo | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DebuginfoUpload | ||
*/ | ||
export interface DownloadInfo { | ||
export interface DebuginfoUpload { | ||
/** | ||
* Source indicates the origin of the debuginfo being downloaded. | ||
* UploadID is the ID of the debuginfo upload. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DownloadInfo.Source source = 1; | ||
* @generated from protobuf field: string id = 1; | ||
*/ | ||
source: DownloadInfo_Source; | ||
id: string; | ||
/** | ||
* Hash is the hash of the debuginfo. | ||
* | ||
* @generated from protobuf field: string hash = 2; | ||
*/ | ||
hash: string; | ||
/** | ||
* State is the current state of the debuginfo upload. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DebuginfoUpload.State state = 3; | ||
*/ | ||
state: DebuginfoUpload_State; | ||
/** | ||
* StartedAt is the time the debuginfo upload was started. | ||
* | ||
* @generated from protobuf field: google.protobuf.Timestamp started_at = 4; | ||
*/ | ||
startedAt?: Timestamp; | ||
/** | ||
* FinishedAt is the time the debuginfo upload was finished. | ||
* | ||
* @generated from protobuf field: google.protobuf.Timestamp finished_at = 5; | ||
*/ | ||
finishedAt?: Timestamp; | ||
} | ||
/** | ||
* Source enum describes the source a debuginfo is from. | ||
* The state of the debuginfo upload. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.DownloadInfo.Source | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.DebuginfoUpload.State | ||
*/ | ||
export declare enum DownloadInfo_Source { | ||
export declare enum DebuginfoUpload_State { | ||
/** | ||
* To understand when no source is set we have the unknown source. | ||
* To understand when no upload state is set we have the unknown state. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UNKNOWN_UNSPECIFIED = 0; | ||
* @generated from protobuf enum value: STATE_UNKNOWN_UNSPECIFIED = 0; | ||
*/ | ||
UNKNOWN_UNSPECIFIED = 0, | ||
/** | ||
* The debuginfo was uploaded by a user/agent. | ||
* The debuginfo is currently being uploaded. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UPLOAD = 1; | ||
* @generated from protobuf enum value: STATE_UPLOADING = 1; | ||
*/ | ||
UPLOAD = 1, | ||
UPLOADING = 1, | ||
/** | ||
* The debuginfo was downloaded from a public debuginfod server. | ||
* The debuginfo has been uploaded successfully. | ||
* | ||
* @generated from protobuf enum value: SOURCE_DEBUGINFOD = 2; | ||
* @generated from protobuf enum value: STATE_UPLOADED = 2; | ||
*/ | ||
DEBUGINFOD = 2 | ||
UPLOADED = 2 | ||
} | ||
declare class ExistsRequest$Type extends MessageType<ExistsRequest> { | ||
/** | ||
* DebuginfoQuality is the quality of the debuginfo. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DebuginfoQuality | ||
*/ | ||
export interface DebuginfoQuality { | ||
/** | ||
* The debuginfo file is not a valid ELF file. | ||
* | ||
* @generated from protobuf field: bool not_valid_elf = 1; | ||
*/ | ||
notValidElf: boolean; | ||
} | ||
declare class ShouldInitiateUploadRequest$Type extends MessageType<ShouldInitiateUploadRequest> { | ||
constructor(); | ||
create(value?: PartialMessage<ExistsRequest>): ExistsRequest; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExistsRequest): ExistsRequest; | ||
internalBinaryWrite(message: ExistsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
create(value?: PartialMessage<ShouldInitiateUploadRequest>): ShouldInitiateUploadRequest; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShouldInitiateUploadRequest): ShouldInitiateUploadRequest; | ||
internalBinaryWrite(message: ShouldInitiateUploadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ExistsRequest | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest | ||
*/ | ||
export declare const ExistsRequest: ExistsRequest$Type; | ||
declare class ExistsResponse$Type extends MessageType<ExistsResponse> { | ||
export declare const ShouldInitiateUploadRequest: ShouldInitiateUploadRequest$Type; | ||
declare class ShouldInitiateUploadResponse$Type extends MessageType<ShouldInitiateUploadResponse> { | ||
constructor(); | ||
create(value?: PartialMessage<ExistsResponse>): ExistsResponse; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExistsResponse): ExistsResponse; | ||
internalBinaryWrite(message: ExistsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
create(value?: PartialMessage<ShouldInitiateUploadResponse>): ShouldInitiateUploadResponse; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShouldInitiateUploadResponse): ShouldInitiateUploadResponse; | ||
internalBinaryWrite(message: ShouldInitiateUploadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ExistsResponse | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse | ||
*/ | ||
export declare const ExistsResponse: ExistsResponse$Type; | ||
export declare const ShouldInitiateUploadResponse: ShouldInitiateUploadResponse$Type; | ||
declare class InitiateUploadRequest$Type extends MessageType<InitiateUploadRequest> { | ||
constructor(); | ||
create(value?: PartialMessage<InitiateUploadRequest>): InitiateUploadRequest; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InitiateUploadRequest): InitiateUploadRequest; | ||
internalBinaryWrite(message: InitiateUploadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.InitiateUploadRequest | ||
*/ | ||
export declare const InitiateUploadRequest: InitiateUploadRequest$Type; | ||
declare class InitiateUploadResponse$Type extends MessageType<InitiateUploadResponse> { | ||
constructor(); | ||
create(value?: PartialMessage<InitiateUploadResponse>): InitiateUploadResponse; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InitiateUploadResponse): InitiateUploadResponse; | ||
internalBinaryWrite(message: InitiateUploadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.InitiateUploadResponse | ||
*/ | ||
export declare const InitiateUploadResponse: InitiateUploadResponse$Type; | ||
declare class UploadInstructions$Type extends MessageType<UploadInstructions> { | ||
constructor(); | ||
create(value?: PartialMessage<UploadInstructions>): UploadInstructions; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadInstructions): UploadInstructions; | ||
internalBinaryWrite(message: UploadInstructions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.UploadInstructions | ||
*/ | ||
export declare const UploadInstructions: UploadInstructions$Type; | ||
declare class MarkUploadFinishedRequest$Type extends MessageType<MarkUploadFinishedRequest> { | ||
constructor(); | ||
create(value?: PartialMessage<MarkUploadFinishedRequest>): MarkUploadFinishedRequest; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarkUploadFinishedRequest): MarkUploadFinishedRequest; | ||
internalBinaryWrite(message: MarkUploadFinishedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedRequest | ||
*/ | ||
export declare const MarkUploadFinishedRequest: MarkUploadFinishedRequest$Type; | ||
declare class MarkUploadFinishedResponse$Type extends MessageType<MarkUploadFinishedResponse> { | ||
constructor(); | ||
create(value?: PartialMessage<MarkUploadFinishedResponse>): MarkUploadFinishedResponse; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarkUploadFinishedResponse): MarkUploadFinishedResponse; | ||
internalBinaryWrite(message: MarkUploadFinishedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedResponse | ||
*/ | ||
export declare const MarkUploadFinishedResponse: MarkUploadFinishedResponse$Type; | ||
declare class UploadRequest$Type extends MessageType<UploadRequest> { | ||
@@ -243,36 +473,36 @@ constructor(); | ||
export declare const UploadResponse: UploadResponse$Type; | ||
declare class DownloadRequest$Type extends MessageType<DownloadRequest> { | ||
declare class Debuginfo$Type extends MessageType<Debuginfo> { | ||
constructor(); | ||
create(value?: PartialMessage<DownloadRequest>): DownloadRequest; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadRequest): DownloadRequest; | ||
internalBinaryWrite(message: DownloadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
create(value?: PartialMessage<Debuginfo>): Debuginfo; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Debuginfo): Debuginfo; | ||
internalBinaryWrite(message: Debuginfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadRequest | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.Debuginfo | ||
*/ | ||
export declare const DownloadRequest: DownloadRequest$Type; | ||
declare class DownloadResponse$Type extends MessageType<DownloadResponse> { | ||
export declare const Debuginfo: Debuginfo$Type; | ||
declare class DebuginfoUpload$Type extends MessageType<DebuginfoUpload> { | ||
constructor(); | ||
create(value?: PartialMessage<DownloadResponse>): DownloadResponse; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadResponse): DownloadResponse; | ||
internalBinaryWrite(message: DownloadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
create(value?: PartialMessage<DebuginfoUpload>): DebuginfoUpload; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DebuginfoUpload): DebuginfoUpload; | ||
internalBinaryWrite(message: DebuginfoUpload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadResponse | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DebuginfoUpload | ||
*/ | ||
export declare const DownloadResponse: DownloadResponse$Type; | ||
declare class DownloadInfo$Type extends MessageType<DownloadInfo> { | ||
export declare const DebuginfoUpload: DebuginfoUpload$Type; | ||
declare class DebuginfoQuality$Type extends MessageType<DebuginfoQuality> { | ||
constructor(); | ||
create(value?: PartialMessage<DownloadInfo>): DownloadInfo; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadInfo): DownloadInfo; | ||
internalBinaryWrite(message: DownloadInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
create(value?: PartialMessage<DebuginfoQuality>): DebuginfoQuality; | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DebuginfoQuality): DebuginfoQuality; | ||
internalBinaryWrite(message: DebuginfoQuality, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadInfo | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DebuginfoQuality | ||
*/ | ||
export declare const DownloadInfo: DownloadInfo$Type; | ||
export declare const DebuginfoQuality: DebuginfoQuality$Type; | ||
/** | ||
* @generated ServiceType for protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated ServiceType for protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export declare const DebugInfoService: ServiceType; | ||
export declare const DebuginfoService: ServiceType; | ||
export {}; |
@@ -10,10 +10,37 @@ // @generated by protobuf-ts 2.8.2 with parameter long_type_string,generate_dependencies | ||
import { MessageType } from "@protobuf-ts/runtime"; | ||
import { Timestamp } from "../../../google/protobuf/timestamp"; | ||
/** | ||
* Source enum describes the source a debuginfo is from. | ||
* The strategy to use for uploading. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.DownloadInfo.Source | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy | ||
*/ | ||
export var DownloadInfo_Source; | ||
(function (DownloadInfo_Source) { | ||
export var UploadInstructions_UploadStrategy; | ||
(function (UploadInstructions_UploadStrategy) { | ||
/** | ||
* The upload is not allowed. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_UNSPECIFIED = 0; | ||
*/ | ||
UploadInstructions_UploadStrategy[UploadInstructions_UploadStrategy["UNSPECIFIED"] = 0] = "UNSPECIFIED"; | ||
/** | ||
* The upload is allowed and should be done via the Upload RPC. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_GRPC = 1; | ||
*/ | ||
UploadInstructions_UploadStrategy[UploadInstructions_UploadStrategy["GRPC"] = 1] = "GRPC"; | ||
/** | ||
* The upload is allowed and should be done via a returned signed URL. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_SIGNED_URL = 2; | ||
*/ | ||
UploadInstructions_UploadStrategy[UploadInstructions_UploadStrategy["SIGNED_URL"] = 2] = "SIGNED_URL"; | ||
})(UploadInstructions_UploadStrategy || (UploadInstructions_UploadStrategy = {})); | ||
/** | ||
* Source is the source of the debuginfo. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.Debuginfo.Source | ||
*/ | ||
export var Debuginfo_Source; | ||
(function (Debuginfo_Source) { | ||
/** | ||
* To understand when no source is set we have the unknown source. | ||
@@ -23,3 +50,3 @@ * | ||
*/ | ||
DownloadInfo_Source[DownloadInfo_Source["UNKNOWN_UNSPECIFIED"] = 0] = "UNKNOWN_UNSPECIFIED"; | ||
Debuginfo_Source[Debuginfo_Source["UNKNOWN_UNSPECIFIED"] = 0] = "UNKNOWN_UNSPECIFIED"; | ||
/** | ||
@@ -30,14 +57,40 @@ * The debuginfo was uploaded by a user/agent. | ||
*/ | ||
DownloadInfo_Source[DownloadInfo_Source["UPLOAD"] = 1] = "UPLOAD"; | ||
Debuginfo_Source[Debuginfo_Source["UPLOAD"] = 1] = "UPLOAD"; | ||
/** | ||
* The debuginfo was downloaded from a public debuginfod server. | ||
* The debuginfo is available from the configured debuginfod server(s). | ||
* | ||
* @generated from protobuf enum value: SOURCE_DEBUGINFOD = 2; | ||
*/ | ||
DownloadInfo_Source[DownloadInfo_Source["DEBUGINFOD"] = 2] = "DEBUGINFOD"; | ||
})(DownloadInfo_Source || (DownloadInfo_Source = {})); | ||
Debuginfo_Source[Debuginfo_Source["DEBUGINFOD"] = 2] = "DEBUGINFOD"; | ||
})(Debuginfo_Source || (Debuginfo_Source = {})); | ||
/** | ||
* The state of the debuginfo upload. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.DebuginfoUpload.State | ||
*/ | ||
export var DebuginfoUpload_State; | ||
(function (DebuginfoUpload_State) { | ||
/** | ||
* To understand when no upload state is set we have the unknown state. | ||
* | ||
* @generated from protobuf enum value: STATE_UNKNOWN_UNSPECIFIED = 0; | ||
*/ | ||
DebuginfoUpload_State[DebuginfoUpload_State["UNKNOWN_UNSPECIFIED"] = 0] = "UNKNOWN_UNSPECIFIED"; | ||
/** | ||
* The debuginfo is currently being uploaded. | ||
* | ||
* @generated from protobuf enum value: STATE_UPLOADING = 1; | ||
*/ | ||
DebuginfoUpload_State[DebuginfoUpload_State["UPLOADING"] = 1] = "UPLOADING"; | ||
/** | ||
* The debuginfo has been uploaded successfully. | ||
* | ||
* @generated from protobuf enum value: STATE_UPLOADED = 2; | ||
*/ | ||
DebuginfoUpload_State[DebuginfoUpload_State["UPLOADED"] = 2] = "UPLOADED"; | ||
})(DebuginfoUpload_State || (DebuginfoUpload_State = {})); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class ExistsRequest$Type extends MessageType { | ||
class ShouldInitiateUploadRequest$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.ExistsRequest", [ | ||
super("parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
@@ -90,14 +143,15 @@ { no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ExistsRequest | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest | ||
*/ | ||
export const ExistsRequest = new ExistsRequest$Type(); | ||
export const ShouldInitiateUploadRequest = new ShouldInitiateUploadRequest$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class ExistsResponse$Type extends MessageType { | ||
class ShouldInitiateUploadResponse$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.ExistsResponse", [ | ||
{ no: 1, name: "exists", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } | ||
super("parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse", [ | ||
{ no: 1, name: "should_initiate_upload", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, | ||
{ no: 2, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value) { | ||
const message = { exists: false }; | ||
const message = { shouldInitiateUpload: false, reason: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
@@ -113,5 +167,8 @@ if (value !== undefined) | ||
switch (fieldNo) { | ||
case /* bool exists */ 1: | ||
message.exists = reader.bool(); | ||
case /* bool should_initiate_upload */ 1: | ||
message.shouldInitiateUpload = reader.bool(); | ||
break; | ||
case /* string reason */ 2: | ||
message.reason = reader.string(); | ||
break; | ||
default: | ||
@@ -129,5 +186,8 @@ let u = options.readUnknownField; | ||
internalBinaryWrite(message, writer, options) { | ||
/* bool exists = 1; */ | ||
if (message.exists !== false) | ||
writer.tag(1, WireType.Varint).bool(message.exists); | ||
/* bool should_initiate_upload = 1; */ | ||
if (message.shouldInitiateUpload !== false) | ||
writer.tag(1, WireType.Varint).bool(message.shouldInitiateUpload); | ||
/* string reason = 2; */ | ||
if (message.reason !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.reason); | ||
let u = options.writeUnknownFields; | ||
@@ -140,6 +200,262 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ExistsResponse | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse | ||
*/ | ||
export const ExistsResponse = new ExistsResponse$Type(); | ||
export const ShouldInitiateUploadResponse = new ShouldInitiateUploadResponse$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class InitiateUploadRequest$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.InitiateUploadRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, | ||
{ no: 3, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value) { | ||
const message = { buildId: "", size: "0", hash: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader, length, options, target) { | ||
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* string build_id */ 1: | ||
message.buildId = reader.string(); | ||
break; | ||
case /* int64 size */ 2: | ||
message.size = reader.int64().toString(); | ||
break; | ||
case /* string hash */ 3: | ||
message.hash = reader.string(); | ||
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, writer, options) { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* int64 size = 2; */ | ||
if (message.size !== "0") | ||
writer.tag(2, WireType.Varint).int64(message.size); | ||
/* string hash = 3; */ | ||
if (message.hash !== "") | ||
writer.tag(3, WireType.LengthDelimited).string(message.hash); | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.InitiateUploadRequest | ||
*/ | ||
export const InitiateUploadRequest = new InitiateUploadRequest$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class InitiateUploadResponse$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.InitiateUploadResponse", [ | ||
{ no: 1, name: "upload_instructions", kind: "message", T: () => UploadInstructions } | ||
]); | ||
} | ||
create(value) { | ||
const message = {}; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader, length, options, target) { | ||
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* parca.debuginfo.v1alpha1.UploadInstructions upload_instructions */ 1: | ||
message.uploadInstructions = UploadInstructions.internalBinaryRead(reader, reader.uint32(), options, message.uploadInstructions); | ||
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, writer, options) { | ||
/* parca.debuginfo.v1alpha1.UploadInstructions upload_instructions = 1; */ | ||
if (message.uploadInstructions) | ||
UploadInstructions.internalBinaryWrite(message.uploadInstructions, writer.tag(1, 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.debuginfo.v1alpha1.InitiateUploadResponse | ||
*/ | ||
export const InitiateUploadResponse = new InitiateUploadResponse$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class UploadInstructions$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.UploadInstructions", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 3, name: "upload_strategy", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy", UploadInstructions_UploadStrategy, "UPLOAD_STRATEGY_"] }, | ||
{ no: 4, name: "signed_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value) { | ||
const message = { buildId: "", uploadId: "", uploadStrategy: 0, signedUrl: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader, length, options, target) { | ||
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* string build_id */ 1: | ||
message.buildId = reader.string(); | ||
break; | ||
case /* string upload_id */ 2: | ||
message.uploadId = reader.string(); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy upload_strategy */ 3: | ||
message.uploadStrategy = reader.int32(); | ||
break; | ||
case /* string signed_url */ 4: | ||
message.signedUrl = reader.string(); | ||
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, writer, options) { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* string upload_id = 2; */ | ||
if (message.uploadId !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.uploadId); | ||
/* parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy upload_strategy = 3; */ | ||
if (message.uploadStrategy !== 0) | ||
writer.tag(3, WireType.Varint).int32(message.uploadStrategy); | ||
/* string signed_url = 4; */ | ||
if (message.signedUrl !== "") | ||
writer.tag(4, WireType.LengthDelimited).string(message.signedUrl); | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.UploadInstructions | ||
*/ | ||
export const UploadInstructions = new UploadInstructions$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class MarkUploadFinishedRequest$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.MarkUploadFinishedRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value) { | ||
const message = { buildId: "", uploadId: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader, length, options, target) { | ||
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* string build_id */ 1: | ||
message.buildId = reader.string(); | ||
break; | ||
case /* string upload_id */ 2: | ||
message.uploadId = reader.string(); | ||
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, writer, options) { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* string upload_id = 2; */ | ||
if (message.uploadId !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.uploadId); | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedRequest | ||
*/ | ||
export const MarkUploadFinishedRequest = new MarkUploadFinishedRequest$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class MarkUploadFinishedResponse$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.MarkUploadFinishedResponse", []); | ||
} | ||
create(value) { | ||
const message = {}; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader, length, options, target) { | ||
return target !== null && target !== void 0 ? target : this.create(); | ||
} | ||
internalBinaryWrite(message, writer, options) { | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedResponse | ||
*/ | ||
export const MarkUploadFinishedResponse = new MarkUploadFinishedResponse$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class UploadRequest$Type extends MessageType { | ||
@@ -209,7 +525,7 @@ constructor() { | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
{ no: 2, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value) { | ||
const message = { buildId: "", hash: "" }; | ||
const message = { buildId: "", uploadId: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
@@ -228,4 +544,4 @@ if (value !== undefined) | ||
break; | ||
case /* string hash */ 2: | ||
message.hash = reader.string(); | ||
case /* string upload_id */ 2: | ||
message.uploadId = reader.string(); | ||
break; | ||
@@ -247,5 +563,5 @@ default: | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* string hash = 2; */ | ||
if (message.hash !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.hash); | ||
/* string upload_id = 2; */ | ||
if (message.uploadId !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.uploadId); | ||
let u = options.writeUnknownFields; | ||
@@ -316,10 +632,13 @@ if (u !== false) | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class DownloadRequest$Type extends MessageType { | ||
class Debuginfo$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.DownloadRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
super("parca.debuginfo.v1alpha1.Debuginfo", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "source", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.Debuginfo.Source", Debuginfo_Source, "SOURCE_"] }, | ||
{ no: 3, name: "upload", kind: "message", T: () => DebuginfoUpload }, | ||
{ no: 4, name: "quality", kind: "message", T: () => DebuginfoQuality } | ||
]); | ||
} | ||
create(value) { | ||
const message = { buildId: "" }; | ||
const message = { buildId: "", source: 0 }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
@@ -338,2 +657,11 @@ if (value !== undefined) | ||
break; | ||
case /* parca.debuginfo.v1alpha1.Debuginfo.Source source */ 2: | ||
message.source = reader.int32(); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.DebuginfoUpload upload */ 3: | ||
message.upload = DebuginfoUpload.internalBinaryRead(reader, reader.uint32(), options, message.upload); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.DebuginfoQuality quality */ 4: | ||
message.quality = DebuginfoQuality.internalBinaryRead(reader, reader.uint32(), options, message.quality); | ||
break; | ||
default: | ||
@@ -354,2 +682,11 @@ let u = options.readUnknownField; | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* parca.debuginfo.v1alpha1.Debuginfo.Source source = 2; */ | ||
if (message.source !== 0) | ||
writer.tag(2, WireType.Varint).int32(message.source); | ||
/* parca.debuginfo.v1alpha1.DebuginfoUpload upload = 3; */ | ||
if (message.upload) | ||
DebuginfoUpload.internalBinaryWrite(message.upload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); | ||
/* parca.debuginfo.v1alpha1.DebuginfoQuality quality = 4; */ | ||
if (message.quality) | ||
DebuginfoQuality.internalBinaryWrite(message.quality, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); | ||
let u = options.writeUnknownFields; | ||
@@ -362,15 +699,18 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadRequest | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.Debuginfo | ||
*/ | ||
export const DownloadRequest = new DownloadRequest$Type(); | ||
export const Debuginfo = new Debuginfo$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class DownloadResponse$Type extends MessageType { | ||
class DebuginfoUpload$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.DownloadResponse", [ | ||
{ no: 1, name: "info", kind: "message", oneof: "data", T: () => DownloadInfo }, | ||
{ no: 2, name: "chunk_data", kind: "scalar", oneof: "data", T: 12 /*ScalarType.BYTES*/ } | ||
super("parca.debuginfo.v1alpha1.DebuginfoUpload", [ | ||
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 3, name: "state", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.DebuginfoUpload.State", DebuginfoUpload_State, "STATE_"] }, | ||
{ no: 4, name: "started_at", kind: "message", T: () => Timestamp }, | ||
{ no: 5, name: "finished_at", kind: "message", T: () => Timestamp } | ||
]); | ||
} | ||
create(value) { | ||
const message = { data: { oneofKind: undefined } }; | ||
const message = { id: "", hash: "", state: 0 }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
@@ -386,14 +726,17 @@ if (value !== undefined) | ||
switch (fieldNo) { | ||
case /* parca.debuginfo.v1alpha1.DownloadInfo info */ 1: | ||
message.data = { | ||
oneofKind: "info", | ||
info: DownloadInfo.internalBinaryRead(reader, reader.uint32(), options, message.data.info) | ||
}; | ||
case /* string id */ 1: | ||
message.id = reader.string(); | ||
break; | ||
case /* bytes chunk_data */ 2: | ||
message.data = { | ||
oneofKind: "chunkData", | ||
chunkData: reader.bytes() | ||
}; | ||
case /* string hash */ 2: | ||
message.hash = reader.string(); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.DebuginfoUpload.State state */ 3: | ||
message.state = reader.int32(); | ||
break; | ||
case /* google.protobuf.Timestamp started_at */ 4: | ||
message.startedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startedAt); | ||
break; | ||
case /* google.protobuf.Timestamp finished_at */ 5: | ||
message.finishedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.finishedAt); | ||
break; | ||
default: | ||
@@ -411,8 +754,17 @@ let u = options.readUnknownField; | ||
internalBinaryWrite(message, writer, options) { | ||
/* parca.debuginfo.v1alpha1.DownloadInfo info = 1; */ | ||
if (message.data.oneofKind === "info") | ||
DownloadInfo.internalBinaryWrite(message.data.info, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); | ||
/* bytes chunk_data = 2; */ | ||
if (message.data.oneofKind === "chunkData") | ||
writer.tag(2, WireType.LengthDelimited).bytes(message.data.chunkData); | ||
/* string id = 1; */ | ||
if (message.id !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.id); | ||
/* string hash = 2; */ | ||
if (message.hash !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.hash); | ||
/* parca.debuginfo.v1alpha1.DebuginfoUpload.State state = 3; */ | ||
if (message.state !== 0) | ||
writer.tag(3, WireType.Varint).int32(message.state); | ||
/* google.protobuf.Timestamp started_at = 4; */ | ||
if (message.startedAt) | ||
Timestamp.internalBinaryWrite(message.startedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); | ||
/* google.protobuf.Timestamp finished_at = 5; */ | ||
if (message.finishedAt) | ||
Timestamp.internalBinaryWrite(message.finishedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); | ||
let u = options.writeUnknownFields; | ||
@@ -425,14 +777,14 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadResponse | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DebuginfoUpload | ||
*/ | ||
export const DownloadResponse = new DownloadResponse$Type(); | ||
export const DebuginfoUpload = new DebuginfoUpload$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class DownloadInfo$Type extends MessageType { | ||
class DebuginfoQuality$Type extends MessageType { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.DownloadInfo", [ | ||
{ no: 1, name: "source", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.DownloadInfo.Source", DownloadInfo_Source, "SOURCE_"] } | ||
super("parca.debuginfo.v1alpha1.DebuginfoQuality", [ | ||
{ no: 1, name: "not_valid_elf", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } | ||
]); | ||
} | ||
create(value) { | ||
const message = { source: 0 }; | ||
const message = { notValidElf: false }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
@@ -448,4 +800,4 @@ if (value !== undefined) | ||
switch (fieldNo) { | ||
case /* parca.debuginfo.v1alpha1.DownloadInfo.Source source */ 1: | ||
message.source = reader.int32(); | ||
case /* bool not_valid_elf */ 1: | ||
message.notValidElf = reader.bool(); | ||
break; | ||
@@ -464,5 +816,5 @@ default: | ||
internalBinaryWrite(message, writer, options) { | ||
/* parca.debuginfo.v1alpha1.DownloadInfo.Source source = 1; */ | ||
if (message.source !== 0) | ||
writer.tag(1, WireType.Varint).int32(message.source); | ||
/* bool not_valid_elf = 1; */ | ||
if (message.notValidElf !== false) | ||
writer.tag(1, WireType.Varint).bool(message.notValidElf); | ||
let u = options.writeUnknownFields; | ||
@@ -475,12 +827,13 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadInfo | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DebuginfoQuality | ||
*/ | ||
export const DownloadInfo = new DownloadInfo$Type(); | ||
export const DebuginfoQuality = new DebuginfoQuality$Type(); | ||
/** | ||
* @generated ServiceType for protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated ServiceType for protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export const DebugInfoService = new ServiceType("parca.debuginfo.v1alpha1.DebugInfoService", [ | ||
{ name: "Exists", options: {}, I: ExistsRequest, O: ExistsResponse }, | ||
export const DebuginfoService = new ServiceType("parca.debuginfo.v1alpha1.DebuginfoService", [ | ||
{ name: "Upload", clientStreaming: true, options: {}, I: UploadRequest, O: UploadResponse }, | ||
{ name: "Download", serverStreaming: true, options: {}, I: DownloadRequest, O: DownloadResponse } | ||
{ name: "ShouldInitiateUpload", options: {}, I: ShouldInitiateUploadRequest, O: ShouldInitiateUploadResponse }, | ||
{ name: "InitiateUpload", options: {}, I: InitiateUploadRequest, O: InitiateUploadResponse }, | ||
{ name: "MarkUploadFinished", options: {}, I: MarkUploadFinishedRequest, O: MarkUploadFinishedResponse } | ||
]); |
{ | ||
"name": "@parca/client", | ||
"version": "0.16.57", | ||
"version": "0.16.58", | ||
"description": "Parca API Client", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "f9d9dea9b3c3c2c7f8ca3e53b8f6496e2848ac8c" | ||
"gitHead": "5cb6f84f78525b2bffd1d498d99e83868d793333" | ||
} |
@@ -6,27 +6,22 @@ // @generated by protobuf-ts 2.8.2 with parameter long_type_string,generate_dependencies | ||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; | ||
import { DebugInfoService } from "./debuginfo"; | ||
import type { DownloadResponse } from "./debuginfo"; | ||
import type { DownloadRequest } from "./debuginfo"; | ||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc"; | ||
import { DebuginfoService } from "./debuginfo"; | ||
import type { MarkUploadFinishedResponse } from "./debuginfo"; | ||
import type { MarkUploadFinishedRequest } from "./debuginfo"; | ||
import type { InitiateUploadResponse } from "./debuginfo"; | ||
import type { InitiateUploadRequest } from "./debuginfo"; | ||
import type { ShouldInitiateUploadResponse } from "./debuginfo"; | ||
import type { ShouldInitiateUploadRequest } from "./debuginfo"; | ||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; | ||
import { stackIntercept } from "@protobuf-ts/runtime-rpc"; | ||
import type { UploadResponse } from "./debuginfo"; | ||
import type { UploadRequest } from "./debuginfo"; | ||
import type { ClientStreamingCall } from "@protobuf-ts/runtime-rpc"; | ||
import { stackIntercept } from "@protobuf-ts/runtime-rpc"; | ||
import type { ExistsResponse } from "./debuginfo"; | ||
import type { ExistsRequest } from "./debuginfo"; | ||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; | ||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; | ||
/** | ||
* DebugInfoService is a service that allows storage of debug info | ||
* DebuginfoService is a service that allows storage of debug info | ||
* | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export interface IDebugInfoServiceClient { | ||
export interface IDebuginfoServiceClient { | ||
/** | ||
* Exists returns true if the given build_id has debug info uploaded for it. | ||
* | ||
* @generated from protobuf rpc: Exists(parca.debuginfo.v1alpha1.ExistsRequest) returns (parca.debuginfo.v1alpha1.ExistsResponse); | ||
*/ | ||
exists(input: ExistsRequest, options?: RpcOptions): UnaryCall<ExistsRequest, ExistsResponse>; | ||
/** | ||
* Upload ingests debug info for a given build_id | ||
@@ -38,46 +33,67 @@ * | ||
/** | ||
* Download returns the debug info for a given build_id. | ||
* ShouldInitiateUpload returns whether an upload for a given build_id should be initiated or not. | ||
* | ||
* @generated from protobuf rpc: Download(parca.debuginfo.v1alpha1.DownloadRequest) returns (stream parca.debuginfo.v1alpha1.DownloadResponse); | ||
* @generated from protobuf rpc: ShouldInitiateUpload(parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest) returns (parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse); | ||
*/ | ||
download(input: DownloadRequest, options?: RpcOptions): ServerStreamingCall<DownloadRequest, DownloadResponse>; | ||
shouldInitiateUpload(input: ShouldInitiateUploadRequest, options?: RpcOptions): UnaryCall<ShouldInitiateUploadRequest, ShouldInitiateUploadResponse>; | ||
/** | ||
* InitiateUpload returns a strategy and information to upload debug info for a given build_id. | ||
* | ||
* @generated from protobuf rpc: InitiateUpload(parca.debuginfo.v1alpha1.InitiateUploadRequest) returns (parca.debuginfo.v1alpha1.InitiateUploadResponse); | ||
*/ | ||
initiateUpload(input: InitiateUploadRequest, options?: RpcOptions): UnaryCall<InitiateUploadRequest, InitiateUploadResponse>; | ||
/** | ||
* MarkUploadFinished marks the upload as finished for a given build_id. | ||
* | ||
* @generated from protobuf rpc: MarkUploadFinished(parca.debuginfo.v1alpha1.MarkUploadFinishedRequest) returns (parca.debuginfo.v1alpha1.MarkUploadFinishedResponse); | ||
*/ | ||
markUploadFinished(input: MarkUploadFinishedRequest, options?: RpcOptions): UnaryCall<MarkUploadFinishedRequest, MarkUploadFinishedResponse>; | ||
} | ||
/** | ||
* DebugInfoService is a service that allows storage of debug info | ||
* DebuginfoService is a service that allows storage of debug info | ||
* | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated from protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export class DebugInfoServiceClient implements IDebugInfoServiceClient, ServiceInfo { | ||
typeName = DebugInfoService.typeName; | ||
methods = DebugInfoService.methods; | ||
options = DebugInfoService.options; | ||
export class DebuginfoServiceClient implements IDebuginfoServiceClient, ServiceInfo { | ||
typeName = DebuginfoService.typeName; | ||
methods = DebuginfoService.methods; | ||
options = DebuginfoService.options; | ||
constructor(private readonly _transport: RpcTransport) { | ||
} | ||
/** | ||
* Exists returns true if the given build_id has debug info uploaded for it. | ||
* Upload ingests debug info for a given build_id | ||
* | ||
* @generated from protobuf rpc: Exists(parca.debuginfo.v1alpha1.ExistsRequest) returns (parca.debuginfo.v1alpha1.ExistsResponse); | ||
* @generated from protobuf rpc: Upload(stream parca.debuginfo.v1alpha1.UploadRequest) returns (parca.debuginfo.v1alpha1.UploadResponse); | ||
*/ | ||
exists(input: ExistsRequest, options?: RpcOptions): UnaryCall<ExistsRequest, ExistsResponse> { | ||
upload(options?: RpcOptions): ClientStreamingCall<UploadRequest, UploadResponse> { | ||
const method = this.methods[0], opt = this._transport.mergeOptions(options); | ||
return stackIntercept<ExistsRequest, ExistsResponse>("unary", this._transport, method, opt, input); | ||
return stackIntercept<UploadRequest, UploadResponse>("clientStreaming", this._transport, method, opt); | ||
} | ||
/** | ||
* Upload ingests debug info for a given build_id | ||
* ShouldInitiateUpload returns whether an upload for a given build_id should be initiated or not. | ||
* | ||
* @generated from protobuf rpc: Upload(stream parca.debuginfo.v1alpha1.UploadRequest) returns (parca.debuginfo.v1alpha1.UploadResponse); | ||
* @generated from protobuf rpc: ShouldInitiateUpload(parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest) returns (parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse); | ||
*/ | ||
upload(options?: RpcOptions): ClientStreamingCall<UploadRequest, UploadResponse> { | ||
shouldInitiateUpload(input: ShouldInitiateUploadRequest, options?: RpcOptions): UnaryCall<ShouldInitiateUploadRequest, ShouldInitiateUploadResponse> { | ||
const method = this.methods[1], opt = this._transport.mergeOptions(options); | ||
return stackIntercept<UploadRequest, UploadResponse>("clientStreaming", this._transport, method, opt); | ||
return stackIntercept<ShouldInitiateUploadRequest, ShouldInitiateUploadResponse>("unary", this._transport, method, opt, input); | ||
} | ||
/** | ||
* Download returns the debug info for a given build_id. | ||
* InitiateUpload returns a strategy and information to upload debug info for a given build_id. | ||
* | ||
* @generated from protobuf rpc: Download(parca.debuginfo.v1alpha1.DownloadRequest) returns (stream parca.debuginfo.v1alpha1.DownloadResponse); | ||
* @generated from protobuf rpc: InitiateUpload(parca.debuginfo.v1alpha1.InitiateUploadRequest) returns (parca.debuginfo.v1alpha1.InitiateUploadResponse); | ||
*/ | ||
download(input: DownloadRequest, options?: RpcOptions): ServerStreamingCall<DownloadRequest, DownloadResponse> { | ||
initiateUpload(input: InitiateUploadRequest, options?: RpcOptions): UnaryCall<InitiateUploadRequest, InitiateUploadResponse> { | ||
const method = this.methods[2], opt = this._transport.mergeOptions(options); | ||
return stackIntercept<DownloadRequest, DownloadResponse>("serverStreaming", this._transport, method, opt, input); | ||
return stackIntercept<InitiateUploadRequest, InitiateUploadResponse>("unary", this._transport, method, opt, input); | ||
} | ||
/** | ||
* MarkUploadFinished marks the upload as finished for a given build_id. | ||
* | ||
* @generated from protobuf rpc: MarkUploadFinished(parca.debuginfo.v1alpha1.MarkUploadFinishedRequest) returns (parca.debuginfo.v1alpha1.MarkUploadFinishedResponse); | ||
*/ | ||
markUploadFinished(input: MarkUploadFinishedRequest, options?: RpcOptions): UnaryCall<MarkUploadFinishedRequest, MarkUploadFinishedResponse> { | ||
const method = this.methods[3], opt = this._transport.mergeOptions(options); | ||
return stackIntercept<MarkUploadFinishedRequest, MarkUploadFinishedResponse>("unary", this._transport, method, opt, input); | ||
} | ||
} |
@@ -15,10 +15,11 @@ // @generated by protobuf-ts 2.8.2 with parameter long_type_string,generate_dependencies | ||
import { MessageType } from "@protobuf-ts/runtime"; | ||
import { Timestamp } from "../../../google/protobuf/timestamp"; | ||
/** | ||
* ExistsRequest request to determine if debug info exists for a given build_id | ||
* ShouldInitiateUploadRequest is the request for ShouldInitiateUpload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ExistsRequest | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest | ||
*/ | ||
export interface ExistsRequest { | ||
export interface ShouldInitiateUploadRequest { | ||
/** | ||
* build_id is a unique identifier for the debug data | ||
* The build_id of the debuginfo. | ||
* | ||
@@ -29,3 +30,3 @@ * @generated from protobuf field: string build_id = 1; | ||
/** | ||
* hash is the hash of the debug information file | ||
* Hash of the debuginfo to upload. | ||
* | ||
@@ -37,15 +38,142 @@ * @generated from protobuf field: string hash = 2; | ||
/** | ||
* ExistsResponse returns whether the given build_id has debug info | ||
* ShouldInitiateUploadResponse is the response for ShouldInitiateUpload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ExistsResponse | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse | ||
*/ | ||
export interface ExistsResponse { | ||
export interface ShouldInitiateUploadResponse { | ||
/** | ||
* exists indicates if there is debug data present for the given build_id | ||
* Whether an upload should be initiated or not. | ||
* | ||
* @generated from protobuf field: bool exists = 1; | ||
* @generated from protobuf field: bool should_initiate_upload = 1; | ||
*/ | ||
exists: boolean; | ||
shouldInitiateUpload: boolean; | ||
/** | ||
* Reason for why an upload should be initiated or not. | ||
* | ||
* @generated from protobuf field: string reason = 2; | ||
*/ | ||
reason: string; | ||
} | ||
/** | ||
* InitiateUploadRequest is the request to initiate an upload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.InitiateUploadRequest | ||
*/ | ||
export interface InitiateUploadRequest { | ||
/** | ||
* The build_id of the debug info to upload. | ||
* | ||
* @generated from protobuf field: string build_id = 1; | ||
*/ | ||
buildId: string; | ||
/** | ||
* The size of the debug info to upload. | ||
* | ||
* @generated from protobuf field: int64 size = 2; | ||
*/ | ||
size: string; | ||
/** | ||
* Hash of the debuginfo to upload. | ||
* | ||
* @generated from protobuf field: string hash = 3; | ||
*/ | ||
hash: string; | ||
} | ||
/** | ||
* InitiateUploadResponse is the response to an InitiateUploadRequest. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.InitiateUploadResponse | ||
*/ | ||
export interface InitiateUploadResponse { | ||
/** | ||
* UploadInstructions contains the instructions for the client to upload the debuginfo. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.UploadInstructions upload_instructions = 1; | ||
*/ | ||
uploadInstructions?: UploadInstructions; | ||
} | ||
/** | ||
* UploadInstructions contains the instructions for the client to upload debuginfo. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.UploadInstructions | ||
*/ | ||
export interface UploadInstructions { | ||
/** | ||
* The build ID of the debuginfo to upload. | ||
* | ||
* @generated from protobuf field: string build_id = 1; | ||
*/ | ||
buildId: string; | ||
/** | ||
* The upload_id to use for uploading. | ||
* | ||
* @generated from protobuf field: string upload_id = 2; | ||
*/ | ||
uploadId: string; | ||
/** | ||
* The strategy to use for uploading. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy upload_strategy = 3; | ||
*/ | ||
uploadStrategy: UploadInstructions_UploadStrategy; | ||
/** | ||
* The signed url to use for uploading using a PUT request when the upload | ||
* strategy is SIGNED_STRATEGY_URL. | ||
* | ||
* @generated from protobuf field: string signed_url = 4; | ||
*/ | ||
signedUrl: string; | ||
} | ||
/** | ||
* The strategy to use for uploading. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy | ||
*/ | ||
export enum UploadInstructions_UploadStrategy { | ||
/** | ||
* The upload is not allowed. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_UNSPECIFIED = 0; | ||
*/ | ||
UNSPECIFIED = 0, | ||
/** | ||
* The upload is allowed and should be done via the Upload RPC. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_GRPC = 1; | ||
*/ | ||
GRPC = 1, | ||
/** | ||
* The upload is allowed and should be done via a returned signed URL. | ||
* | ||
* @generated from protobuf enum value: UPLOAD_STRATEGY_SIGNED_URL = 2; | ||
*/ | ||
SIGNED_URL = 2 | ||
} | ||
/** | ||
* MarkUploadFinishedRequest is the request to mark an upload as finished. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedRequest | ||
*/ | ||
export interface MarkUploadFinishedRequest { | ||
/** | ||
* The build_id of the debug info to mark as finished. | ||
* | ||
* @generated from protobuf field: string build_id = 1; | ||
*/ | ||
buildId: string; | ||
/** | ||
* The upload_id of the debug info to mark as finished. | ||
* | ||
* @generated from protobuf field: string upload_id = 2; | ||
*/ | ||
uploadId: string; | ||
} | ||
/** | ||
* MarkUploadFinishedResponse is the response to a MarkUploadFinishedRequest. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedResponse | ||
*/ | ||
export interface MarkUploadFinishedResponse { | ||
} | ||
/** | ||
* UploadRequest upload debug info | ||
@@ -92,7 +220,7 @@ * | ||
/** | ||
* hash is the hash of the source file that debug information extracted from | ||
* upload_id is a unique identifier for the upload | ||
* | ||
* @generated from protobuf field: string hash = 2; | ||
* @generated from protobuf field: string upload_id = 2; | ||
*/ | ||
hash: string; | ||
uploadId: string; | ||
} | ||
@@ -119,9 +247,9 @@ /** | ||
/** | ||
* DownloadRequest upload debug info | ||
* Debuginfo contains metadata about a debuginfo file. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DownloadRequest | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.Debuginfo | ||
*/ | ||
export interface DownloadRequest { | ||
export interface Debuginfo { | ||
/** | ||
* build_id is a unique identifier for the debug data | ||
* BuildID is the build ID of the debuginfo. | ||
* | ||
@@ -131,74 +259,126 @@ * @generated from protobuf field: string build_id = 1; | ||
buildId: string; | ||
/** | ||
* Source is the source of the debuginfo. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.Debuginfo.Source source = 2; | ||
*/ | ||
source: Debuginfo_Source; | ||
/** | ||
* DebuginfoUpload is the debuginfo upload metadata. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DebuginfoUpload upload = 3; | ||
*/ | ||
upload?: DebuginfoUpload; | ||
/** | ||
* Quality is the quality of the debuginfo. This is set asynchonously by the | ||
* symbolizer when the debuginfo is actually used. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DebuginfoQuality quality = 4; | ||
*/ | ||
quality?: DebuginfoQuality; | ||
} | ||
/** | ||
* DownloadRequest returns chunked data of the debuginfo. | ||
* Source is the source of the debuginfo. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DownloadResponse | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.Debuginfo.Source | ||
*/ | ||
export interface DownloadResponse { | ||
export enum Debuginfo_Source { | ||
/** | ||
* @generated from protobuf oneof: data | ||
* To understand when no source is set we have the unknown source. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UNKNOWN_UNSPECIFIED = 0; | ||
*/ | ||
data: { | ||
oneofKind: "info"; | ||
/** | ||
* info is the metadata for the debug info | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DownloadInfo info = 1; | ||
*/ | ||
info: DownloadInfo; | ||
} | { | ||
oneofKind: "chunkData"; | ||
/** | ||
* chunk_data is the raw bytes of the debug info | ||
* | ||
* @generated from protobuf field: bytes chunk_data = 2; | ||
*/ | ||
chunkData: Uint8Array; | ||
} | { | ||
oneofKind: undefined; | ||
}; | ||
UNKNOWN_UNSPECIFIED = 0, | ||
/** | ||
* The debuginfo was uploaded by a user/agent. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UPLOAD = 1; | ||
*/ | ||
UPLOAD = 1, | ||
/** | ||
* The debuginfo is available from the configured debuginfod server(s). | ||
* | ||
* @generated from protobuf enum value: SOURCE_DEBUGINFOD = 2; | ||
*/ | ||
DEBUGINFOD = 2 | ||
} | ||
/** | ||
* DownloadInfo metadata for the debug data that is being downloaded. | ||
* DebuginfoUpload contains metadata about a debuginfo upload. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DownloadInfo | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DebuginfoUpload | ||
*/ | ||
export interface DownloadInfo { | ||
export interface DebuginfoUpload { | ||
/** | ||
* Source indicates the origin of the debuginfo being downloaded. | ||
* UploadID is the ID of the debuginfo upload. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DownloadInfo.Source source = 1; | ||
* @generated from protobuf field: string id = 1; | ||
*/ | ||
source: DownloadInfo_Source; | ||
id: string; | ||
/** | ||
* Hash is the hash of the debuginfo. | ||
* | ||
* @generated from protobuf field: string hash = 2; | ||
*/ | ||
hash: string; | ||
/** | ||
* State is the current state of the debuginfo upload. | ||
* | ||
* @generated from protobuf field: parca.debuginfo.v1alpha1.DebuginfoUpload.State state = 3; | ||
*/ | ||
state: DebuginfoUpload_State; | ||
/** | ||
* StartedAt is the time the debuginfo upload was started. | ||
* | ||
* @generated from protobuf field: google.protobuf.Timestamp started_at = 4; | ||
*/ | ||
startedAt?: Timestamp; | ||
/** | ||
* FinishedAt is the time the debuginfo upload was finished. | ||
* | ||
* @generated from protobuf field: google.protobuf.Timestamp finished_at = 5; | ||
*/ | ||
finishedAt?: Timestamp; | ||
} | ||
/** | ||
* Source enum describes the source a debuginfo is from. | ||
* The state of the debuginfo upload. | ||
* | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.DownloadInfo.Source | ||
* @generated from protobuf enum parca.debuginfo.v1alpha1.DebuginfoUpload.State | ||
*/ | ||
export enum DownloadInfo_Source { | ||
export enum DebuginfoUpload_State { | ||
/** | ||
* To understand when no source is set we have the unknown source. | ||
* To understand when no upload state is set we have the unknown state. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UNKNOWN_UNSPECIFIED = 0; | ||
* @generated from protobuf enum value: STATE_UNKNOWN_UNSPECIFIED = 0; | ||
*/ | ||
UNKNOWN_UNSPECIFIED = 0, | ||
/** | ||
* The debuginfo was uploaded by a user/agent. | ||
* The debuginfo is currently being uploaded. | ||
* | ||
* @generated from protobuf enum value: SOURCE_UPLOAD = 1; | ||
* @generated from protobuf enum value: STATE_UPLOADING = 1; | ||
*/ | ||
UPLOAD = 1, | ||
UPLOADING = 1, | ||
/** | ||
* The debuginfo was downloaded from a public debuginfod server. | ||
* The debuginfo has been uploaded successfully. | ||
* | ||
* @generated from protobuf enum value: SOURCE_DEBUGINFOD = 2; | ||
* @generated from protobuf enum value: STATE_UPLOADED = 2; | ||
*/ | ||
DEBUGINFOD = 2 | ||
UPLOADED = 2 | ||
} | ||
/** | ||
* DebuginfoQuality is the quality of the debuginfo. | ||
* | ||
* @generated from protobuf message parca.debuginfo.v1alpha1.DebuginfoQuality | ||
*/ | ||
export interface DebuginfoQuality { | ||
/** | ||
* The debuginfo file is not a valid ELF file. | ||
* | ||
* @generated from protobuf field: bool not_valid_elf = 1; | ||
*/ | ||
notValidElf: boolean; | ||
} | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class ExistsRequest$Type extends MessageType<ExistsRequest> { | ||
class ShouldInitiateUploadRequest$Type extends MessageType<ShouldInitiateUploadRequest> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.ExistsRequest", [ | ||
super("parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
@@ -208,10 +388,10 @@ { no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
} | ||
create(value?: PartialMessage<ExistsRequest>): ExistsRequest { | ||
create(value?: PartialMessage<ShouldInitiateUploadRequest>): ShouldInitiateUploadRequest { | ||
const message = { buildId: "", hash: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<ExistsRequest>(this, message, value); | ||
reflectionMergePartial<ShouldInitiateUploadRequest>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExistsRequest): ExistsRequest { | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShouldInitiateUploadRequest): ShouldInitiateUploadRequest { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
@@ -238,3 +418,3 @@ while (reader.pos < end) { | ||
} | ||
internalBinaryWrite(message: ExistsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
internalBinaryWrite(message: ShouldInitiateUploadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* string build_id = 1; */ | ||
@@ -253,20 +433,21 @@ if (message.buildId !== "") | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ExistsRequest | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadRequest | ||
*/ | ||
export const ExistsRequest = new ExistsRequest$Type(); | ||
export const ShouldInitiateUploadRequest = new ShouldInitiateUploadRequest$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class ExistsResponse$Type extends MessageType<ExistsResponse> { | ||
class ShouldInitiateUploadResponse$Type extends MessageType<ShouldInitiateUploadResponse> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.ExistsResponse", [ | ||
{ no: 1, name: "exists", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } | ||
super("parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse", [ | ||
{ no: 1, name: "should_initiate_upload", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, | ||
{ no: 2, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value?: PartialMessage<ExistsResponse>): ExistsResponse { | ||
const message = { exists: false }; | ||
create(value?: PartialMessage<ShouldInitiateUploadResponse>): ShouldInitiateUploadResponse { | ||
const message = { shouldInitiateUpload: false, reason: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<ExistsResponse>(this, message, value); | ||
reflectionMergePartial<ShouldInitiateUploadResponse>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExistsResponse): ExistsResponse { | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShouldInitiateUploadResponse): ShouldInitiateUploadResponse { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
@@ -276,5 +457,8 @@ while (reader.pos < end) { | ||
switch (fieldNo) { | ||
case /* bool exists */ 1: | ||
message.exists = reader.bool(); | ||
case /* bool should_initiate_upload */ 1: | ||
message.shouldInitiateUpload = reader.bool(); | ||
break; | ||
case /* string reason */ 2: | ||
message.reason = reader.string(); | ||
break; | ||
default: | ||
@@ -291,6 +475,9 @@ let u = options.readUnknownField; | ||
} | ||
internalBinaryWrite(message: ExistsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* bool exists = 1; */ | ||
if (message.exists !== false) | ||
writer.tag(1, WireType.Varint).bool(message.exists); | ||
internalBinaryWrite(message: ShouldInitiateUploadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* bool should_initiate_upload = 1; */ | ||
if (message.shouldInitiateUpload !== false) | ||
writer.tag(1, WireType.Varint).bool(message.shouldInitiateUpload); | ||
/* string reason = 2; */ | ||
if (message.reason !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.reason); | ||
let u = options.writeUnknownFields; | ||
@@ -303,6 +490,262 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ExistsResponse | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.ShouldInitiateUploadResponse | ||
*/ | ||
export const ExistsResponse = new ExistsResponse$Type(); | ||
export const ShouldInitiateUploadResponse = new ShouldInitiateUploadResponse$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class InitiateUploadRequest$Type extends MessageType<InitiateUploadRequest> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.InitiateUploadRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, | ||
{ no: 3, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value?: PartialMessage<InitiateUploadRequest>): InitiateUploadRequest { | ||
const message = { buildId: "", size: "0", hash: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<InitiateUploadRequest>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InitiateUploadRequest): InitiateUploadRequest { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* string build_id */ 1: | ||
message.buildId = reader.string(); | ||
break; | ||
case /* int64 size */ 2: | ||
message.size = reader.int64().toString(); | ||
break; | ||
case /* string hash */ 3: | ||
message.hash = reader.string(); | ||
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: InitiateUploadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* int64 size = 2; */ | ||
if (message.size !== "0") | ||
writer.tag(2, WireType.Varint).int64(message.size); | ||
/* string hash = 3; */ | ||
if (message.hash !== "") | ||
writer.tag(3, WireType.LengthDelimited).string(message.hash); | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.InitiateUploadRequest | ||
*/ | ||
export const InitiateUploadRequest = new InitiateUploadRequest$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class InitiateUploadResponse$Type extends MessageType<InitiateUploadResponse> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.InitiateUploadResponse", [ | ||
{ no: 1, name: "upload_instructions", kind: "message", T: () => UploadInstructions } | ||
]); | ||
} | ||
create(value?: PartialMessage<InitiateUploadResponse>): InitiateUploadResponse { | ||
const message = {}; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<InitiateUploadResponse>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: InitiateUploadResponse): InitiateUploadResponse { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* parca.debuginfo.v1alpha1.UploadInstructions upload_instructions */ 1: | ||
message.uploadInstructions = UploadInstructions.internalBinaryRead(reader, reader.uint32(), options, message.uploadInstructions); | ||
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: InitiateUploadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* parca.debuginfo.v1alpha1.UploadInstructions upload_instructions = 1; */ | ||
if (message.uploadInstructions) | ||
UploadInstructions.internalBinaryWrite(message.uploadInstructions, writer.tag(1, 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.debuginfo.v1alpha1.InitiateUploadResponse | ||
*/ | ||
export const InitiateUploadResponse = new InitiateUploadResponse$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class UploadInstructions$Type extends MessageType<UploadInstructions> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.UploadInstructions", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 3, name: "upload_strategy", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy", UploadInstructions_UploadStrategy, "UPLOAD_STRATEGY_"] }, | ||
{ no: 4, name: "signed_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value?: PartialMessage<UploadInstructions>): UploadInstructions { | ||
const message = { buildId: "", uploadId: "", uploadStrategy: 0, signedUrl: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<UploadInstructions>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadInstructions): UploadInstructions { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* string build_id */ 1: | ||
message.buildId = reader.string(); | ||
break; | ||
case /* string upload_id */ 2: | ||
message.uploadId = reader.string(); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy upload_strategy */ 3: | ||
message.uploadStrategy = reader.int32(); | ||
break; | ||
case /* string signed_url */ 4: | ||
message.signedUrl = reader.string(); | ||
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: UploadInstructions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* string upload_id = 2; */ | ||
if (message.uploadId !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.uploadId); | ||
/* parca.debuginfo.v1alpha1.UploadInstructions.UploadStrategy upload_strategy = 3; */ | ||
if (message.uploadStrategy !== 0) | ||
writer.tag(3, WireType.Varint).int32(message.uploadStrategy); | ||
/* string signed_url = 4; */ | ||
if (message.signedUrl !== "") | ||
writer.tag(4, WireType.LengthDelimited).string(message.signedUrl); | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.UploadInstructions | ||
*/ | ||
export const UploadInstructions = new UploadInstructions$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class MarkUploadFinishedRequest$Type extends MessageType<MarkUploadFinishedRequest> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.MarkUploadFinishedRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value?: PartialMessage<MarkUploadFinishedRequest>): MarkUploadFinishedRequest { | ||
const message = { buildId: "", uploadId: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<MarkUploadFinishedRequest>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarkUploadFinishedRequest): MarkUploadFinishedRequest { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
while (reader.pos < end) { | ||
let [fieldNo, wireType] = reader.tag(); | ||
switch (fieldNo) { | ||
case /* string build_id */ 1: | ||
message.buildId = reader.string(); | ||
break; | ||
case /* string upload_id */ 2: | ||
message.uploadId = reader.string(); | ||
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: MarkUploadFinishedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* string upload_id = 2; */ | ||
if (message.uploadId !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.uploadId); | ||
let u = options.writeUnknownFields; | ||
if (u !== false) | ||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); | ||
return writer; | ||
} | ||
} | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.MarkUploadFinishedRequest | ||
*/ | ||
export const MarkUploadFinishedRequest = new MarkUploadFinishedRequest$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class MarkUploadFinishedResponse$Type extends MessageType<MarkUploadFinishedResponse> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.MarkUploadFinishedResponse", []); | ||
} | ||
create(value?: PartialMessage<MarkUploadFinishedResponse>): MarkUploadFinishedResponse { | ||
const message = {}; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<MarkUploadFinishedResponse>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarkUploadFinishedResponse): MarkUploadFinishedResponse { | ||
return target ?? this.create(); | ||
} | ||
internalBinaryWrite(message: MarkUploadFinishedResponse, 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.debuginfo.v1alpha1.MarkUploadFinishedResponse | ||
*/ | ||
export const MarkUploadFinishedResponse = new MarkUploadFinishedResponse$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class UploadRequest$Type extends MessageType<UploadRequest> { | ||
@@ -372,7 +815,7 @@ constructor() { | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
{ no: 2, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
]); | ||
} | ||
create(value?: PartialMessage<UploadInfo>): UploadInfo { | ||
const message = { buildId: "", hash: "" }; | ||
const message = { buildId: "", uploadId: "" }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
@@ -391,4 +834,4 @@ if (value !== undefined) | ||
break; | ||
case /* string hash */ 2: | ||
message.hash = reader.string(); | ||
case /* string upload_id */ 2: | ||
message.uploadId = reader.string(); | ||
break; | ||
@@ -410,5 +853,5 @@ default: | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* string hash = 2; */ | ||
if (message.hash !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.hash); | ||
/* string upload_id = 2; */ | ||
if (message.uploadId !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.uploadId); | ||
let u = options.writeUnknownFields; | ||
@@ -479,16 +922,19 @@ if (u !== false) | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class DownloadRequest$Type extends MessageType<DownloadRequest> { | ||
class Debuginfo$Type extends MessageType<Debuginfo> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.DownloadRequest", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } | ||
super("parca.debuginfo.v1alpha1.Debuginfo", [ | ||
{ no: 1, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "source", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.Debuginfo.Source", Debuginfo_Source, "SOURCE_"] }, | ||
{ no: 3, name: "upload", kind: "message", T: () => DebuginfoUpload }, | ||
{ no: 4, name: "quality", kind: "message", T: () => DebuginfoQuality } | ||
]); | ||
} | ||
create(value?: PartialMessage<DownloadRequest>): DownloadRequest { | ||
const message = { buildId: "" }; | ||
create(value?: PartialMessage<Debuginfo>): Debuginfo { | ||
const message = { buildId: "", source: 0 }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<DownloadRequest>(this, message, value); | ||
reflectionMergePartial<Debuginfo>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadRequest): DownloadRequest { | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Debuginfo): Debuginfo { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
@@ -501,2 +947,11 @@ while (reader.pos < end) { | ||
break; | ||
case /* parca.debuginfo.v1alpha1.Debuginfo.Source source */ 2: | ||
message.source = reader.int32(); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.DebuginfoUpload upload */ 3: | ||
message.upload = DebuginfoUpload.internalBinaryRead(reader, reader.uint32(), options, message.upload); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.DebuginfoQuality quality */ 4: | ||
message.quality = DebuginfoQuality.internalBinaryRead(reader, reader.uint32(), options, message.quality); | ||
break; | ||
default: | ||
@@ -513,6 +968,15 @@ let u = options.readUnknownField; | ||
} | ||
internalBinaryWrite(message: DownloadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
internalBinaryWrite(message: Debuginfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* string build_id = 1; */ | ||
if (message.buildId !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.buildId); | ||
/* parca.debuginfo.v1alpha1.Debuginfo.Source source = 2; */ | ||
if (message.source !== 0) | ||
writer.tag(2, WireType.Varint).int32(message.source); | ||
/* parca.debuginfo.v1alpha1.DebuginfoUpload upload = 3; */ | ||
if (message.upload) | ||
DebuginfoUpload.internalBinaryWrite(message.upload, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); | ||
/* parca.debuginfo.v1alpha1.DebuginfoQuality quality = 4; */ | ||
if (message.quality) | ||
DebuginfoQuality.internalBinaryWrite(message.quality, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); | ||
let u = options.writeUnknownFields; | ||
@@ -525,21 +989,24 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadRequest | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.Debuginfo | ||
*/ | ||
export const DownloadRequest = new DownloadRequest$Type(); | ||
export const Debuginfo = new Debuginfo$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class DownloadResponse$Type extends MessageType<DownloadResponse> { | ||
class DebuginfoUpload$Type extends MessageType<DebuginfoUpload> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.DownloadResponse", [ | ||
{ no: 1, name: "info", kind: "message", oneof: "data", T: () => DownloadInfo }, | ||
{ no: 2, name: "chunk_data", kind: "scalar", oneof: "data", T: 12 /*ScalarType.BYTES*/ } | ||
super("parca.debuginfo.v1alpha1.DebuginfoUpload", [ | ||
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, | ||
{ no: 3, name: "state", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.DebuginfoUpload.State", DebuginfoUpload_State, "STATE_"] }, | ||
{ no: 4, name: "started_at", kind: "message", T: () => Timestamp }, | ||
{ no: 5, name: "finished_at", kind: "message", T: () => Timestamp } | ||
]); | ||
} | ||
create(value?: PartialMessage<DownloadResponse>): DownloadResponse { | ||
const message = { data: { oneofKind: undefined } }; | ||
create(value?: PartialMessage<DebuginfoUpload>): DebuginfoUpload { | ||
const message = { id: "", hash: "", state: 0 }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<DownloadResponse>(this, message, value); | ||
reflectionMergePartial<DebuginfoUpload>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadResponse): DownloadResponse { | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DebuginfoUpload): DebuginfoUpload { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
@@ -549,14 +1016,17 @@ while (reader.pos < end) { | ||
switch (fieldNo) { | ||
case /* parca.debuginfo.v1alpha1.DownloadInfo info */ 1: | ||
message.data = { | ||
oneofKind: "info", | ||
info: DownloadInfo.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).info) | ||
}; | ||
case /* string id */ 1: | ||
message.id = reader.string(); | ||
break; | ||
case /* bytes chunk_data */ 2: | ||
message.data = { | ||
oneofKind: "chunkData", | ||
chunkData: reader.bytes() | ||
}; | ||
case /* string hash */ 2: | ||
message.hash = reader.string(); | ||
break; | ||
case /* parca.debuginfo.v1alpha1.DebuginfoUpload.State state */ 3: | ||
message.state = reader.int32(); | ||
break; | ||
case /* google.protobuf.Timestamp started_at */ 4: | ||
message.startedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startedAt); | ||
break; | ||
case /* google.protobuf.Timestamp finished_at */ 5: | ||
message.finishedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.finishedAt); | ||
break; | ||
default: | ||
@@ -573,9 +1043,18 @@ let u = options.readUnknownField; | ||
} | ||
internalBinaryWrite(message: DownloadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* parca.debuginfo.v1alpha1.DownloadInfo info = 1; */ | ||
if (message.data.oneofKind === "info") | ||
DownloadInfo.internalBinaryWrite(message.data.info, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); | ||
/* bytes chunk_data = 2; */ | ||
if (message.data.oneofKind === "chunkData") | ||
writer.tag(2, WireType.LengthDelimited).bytes(message.data.chunkData); | ||
internalBinaryWrite(message: DebuginfoUpload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* string id = 1; */ | ||
if (message.id !== "") | ||
writer.tag(1, WireType.LengthDelimited).string(message.id); | ||
/* string hash = 2; */ | ||
if (message.hash !== "") | ||
writer.tag(2, WireType.LengthDelimited).string(message.hash); | ||
/* parca.debuginfo.v1alpha1.DebuginfoUpload.State state = 3; */ | ||
if (message.state !== 0) | ||
writer.tag(3, WireType.Varint).int32(message.state); | ||
/* google.protobuf.Timestamp started_at = 4; */ | ||
if (message.startedAt) | ||
Timestamp.internalBinaryWrite(message.startedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); | ||
/* google.protobuf.Timestamp finished_at = 5; */ | ||
if (message.finishedAt) | ||
Timestamp.internalBinaryWrite(message.finishedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); | ||
let u = options.writeUnknownFields; | ||
@@ -588,20 +1067,20 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadResponse | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DebuginfoUpload | ||
*/ | ||
export const DownloadResponse = new DownloadResponse$Type(); | ||
export const DebuginfoUpload = new DebuginfoUpload$Type(); | ||
// @generated message type with reflection information, may provide speed optimized methods | ||
class DownloadInfo$Type extends MessageType<DownloadInfo> { | ||
class DebuginfoQuality$Type extends MessageType<DebuginfoQuality> { | ||
constructor() { | ||
super("parca.debuginfo.v1alpha1.DownloadInfo", [ | ||
{ no: 1, name: "source", kind: "enum", T: () => ["parca.debuginfo.v1alpha1.DownloadInfo.Source", DownloadInfo_Source, "SOURCE_"] } | ||
super("parca.debuginfo.v1alpha1.DebuginfoQuality", [ | ||
{ no: 1, name: "not_valid_elf", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } | ||
]); | ||
} | ||
create(value?: PartialMessage<DownloadInfo>): DownloadInfo { | ||
const message = { source: 0 }; | ||
create(value?: PartialMessage<DebuginfoQuality>): DebuginfoQuality { | ||
const message = { notValidElf: false }; | ||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); | ||
if (value !== undefined) | ||
reflectionMergePartial<DownloadInfo>(this, message, value); | ||
reflectionMergePartial<DebuginfoQuality>(this, message, value); | ||
return message; | ||
} | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadInfo): DownloadInfo { | ||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DebuginfoQuality): DebuginfoQuality { | ||
let message = target ?? this.create(), end = reader.pos + length; | ||
@@ -611,4 +1090,4 @@ while (reader.pos < end) { | ||
switch (fieldNo) { | ||
case /* parca.debuginfo.v1alpha1.DownloadInfo.Source source */ 1: | ||
message.source = reader.int32(); | ||
case /* bool not_valid_elf */ 1: | ||
message.notValidElf = reader.bool(); | ||
break; | ||
@@ -626,6 +1105,6 @@ default: | ||
} | ||
internalBinaryWrite(message: DownloadInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* parca.debuginfo.v1alpha1.DownloadInfo.Source source = 1; */ | ||
if (message.source !== 0) | ||
writer.tag(1, WireType.Varint).int32(message.source); | ||
internalBinaryWrite(message: DebuginfoQuality, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { | ||
/* bool not_valid_elf = 1; */ | ||
if (message.notValidElf !== false) | ||
writer.tag(1, WireType.Varint).bool(message.notValidElf); | ||
let u = options.writeUnknownFields; | ||
@@ -638,12 +1117,13 @@ if (u !== false) | ||
/** | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DownloadInfo | ||
* @generated MessageType for protobuf message parca.debuginfo.v1alpha1.DebuginfoQuality | ||
*/ | ||
export const DownloadInfo = new DownloadInfo$Type(); | ||
export const DebuginfoQuality = new DebuginfoQuality$Type(); | ||
/** | ||
* @generated ServiceType for protobuf service parca.debuginfo.v1alpha1.DebugInfoService | ||
* @generated ServiceType for protobuf service parca.debuginfo.v1alpha1.DebuginfoService | ||
*/ | ||
export const DebugInfoService = new ServiceType("parca.debuginfo.v1alpha1.DebugInfoService", [ | ||
{ name: "Exists", options: {}, I: ExistsRequest, O: ExistsResponse }, | ||
export const DebuginfoService = new ServiceType("parca.debuginfo.v1alpha1.DebuginfoService", [ | ||
{ name: "Upload", clientStreaming: true, options: {}, I: UploadRequest, O: UploadResponse }, | ||
{ name: "Download", serverStreaming: true, options: {}, I: DownloadRequest, O: DownloadResponse } | ||
{ name: "ShouldInitiateUpload", options: {}, I: ShouldInitiateUploadRequest, O: ShouldInitiateUploadResponse }, | ||
{ name: "InitiateUpload", options: {}, I: InitiateUploadRequest, O: InitiateUploadResponse }, | ||
{ name: "MarkUploadFinished", options: {}, I: MarkUploadFinishedRequest, O: MarkUploadFinishedResponse } | ||
]); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1403737
29926