sharev1alpha1

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package sharev1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_parca_share_v1alpha1_share_proto protoreflect.FileDescriptor
View Source
var ShareService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "parca.share.v1alpha1.ShareService",
	HandlerType: (*ShareServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Upload",
			Handler:    _ShareService_Upload_Handler,
		},
		{
			MethodName: "Query",
			Handler:    _ShareService_Query_Handler,
		},
		{
			MethodName: "ProfileTypes",
			Handler:    _ShareService_ProfileTypes_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "parca/share/v1alpha1/share.proto",
}

ShareService_ServiceDesc is the grpc.ServiceDesc for ShareService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterShareServiceHandler

func RegisterShareServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterShareServiceHandler registers the http handlers for service ShareService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterShareServiceHandlerClient

func RegisterShareServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShareServiceClient) error

RegisterShareServiceHandlerClient registers the http handlers for service ShareService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ShareServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ShareServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ShareServiceClient" to call the correct interceptors.

func RegisterShareServiceHandlerFromEndpoint

func RegisterShareServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterShareServiceHandlerFromEndpoint is same as RegisterShareServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterShareServiceHandlerServer

func RegisterShareServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShareServiceServer) error

RegisterShareServiceHandlerServer registers the http handlers for service ShareService to "mux". UnaryRPC :call ShareServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterShareServiceHandlerFromEndpoint instead.

func RegisterShareServiceServer

func RegisterShareServiceServer(s grpc.ServiceRegistrar, srv ShareServiceServer)

Types

type ProfileTypesRequest

type ProfileTypesRequest struct {

	// id of the profile's types to be queried.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

ProfileTypesRequest represents the profile types request with the id of the profile to be queried.

func (*ProfileTypesRequest) Descriptor deprecated

func (*ProfileTypesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ProfileTypesRequest.ProtoReflect.Descriptor instead.

func (*ProfileTypesRequest) GetId

func (x *ProfileTypesRequest) GetId() string

func (*ProfileTypesRequest) MarshalToSizedBufferVT

func (m *ProfileTypesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ProfileTypesRequest) MarshalToVT

func (m *ProfileTypesRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ProfileTypesRequest) MarshalVT

func (m *ProfileTypesRequest) MarshalVT() (dAtA []byte, err error)

func (*ProfileTypesRequest) ProtoMessage

func (*ProfileTypesRequest) ProtoMessage()

func (*ProfileTypesRequest) ProtoReflect

func (x *ProfileTypesRequest) ProtoReflect() protoreflect.Message

func (*ProfileTypesRequest) Reset

func (x *ProfileTypesRequest) Reset()

func (*ProfileTypesRequest) SizeVT

func (m *ProfileTypesRequest) SizeVT() (n int)

func (*ProfileTypesRequest) String

func (x *ProfileTypesRequest) String() string

func (*ProfileTypesRequest) UnmarshalVT

func (m *ProfileTypesRequest) UnmarshalVT(dAtA []byte) error

type ProfileTypesResponse

type ProfileTypesResponse struct {

	// list of available profile types.
	Types []*v1alpha1.ProfileType `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"`
	// description of the profile uploaded.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

ProfileTypesResponse represents the response with the list of available profile types.

func (*ProfileTypesResponse) Descriptor deprecated

func (*ProfileTypesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ProfileTypesResponse.ProtoReflect.Descriptor instead.

func (*ProfileTypesResponse) GetDescription

func (x *ProfileTypesResponse) GetDescription() string

func (*ProfileTypesResponse) GetTypes

func (x *ProfileTypesResponse) GetTypes() []*v1alpha1.ProfileType

func (*ProfileTypesResponse) MarshalToSizedBufferVT

func (m *ProfileTypesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ProfileTypesResponse) MarshalToVT

func (m *ProfileTypesResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ProfileTypesResponse) MarshalVT

func (m *ProfileTypesResponse) MarshalVT() (dAtA []byte, err error)

func (*ProfileTypesResponse) ProtoMessage

func (*ProfileTypesResponse) ProtoMessage()

func (*ProfileTypesResponse) ProtoReflect

func (x *ProfileTypesResponse) ProtoReflect() protoreflect.Message

func (*ProfileTypesResponse) Reset

func (x *ProfileTypesResponse) Reset()

func (*ProfileTypesResponse) SizeVT

func (m *ProfileTypesResponse) SizeVT() (n int)

func (*ProfileTypesResponse) String

func (x *ProfileTypesResponse) String() string

func (*ProfileTypesResponse) UnmarshalVT

func (m *ProfileTypesResponse) UnmarshalVT(dAtA []byte) error

type QueryRequest

type QueryRequest struct {

	// id of the profile to be queried.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Type of the profile to be queried.
	ProfileType *string `protobuf:"bytes,2,opt,name=profile_type,json=profileType,proto3,oneof" json:"profile_type,omitempty"`
	// report_type is the type of report to return
	ReportType v1alpha1.QueryRequest_ReportType `` /* 142-byte string literal not displayed */
	// filter_query is the query string to filter the profile samples
	FilterQuery *string `protobuf:"bytes,4,opt,name=filter_query,json=filterQuery,proto3,oneof" json:"filter_query,omitempty"`
	// node_trim_threshold is the threshold % where the nodes with Value less than this will be removed from the report
	NodeTrimThreshold *float32 `protobuf:"fixed32,5,opt,name=node_trim_threshold,json=nodeTrimThreshold,proto3,oneof" json:"node_trim_threshold,omitempty"`
	// which runtime frames to filter out, often interpreter frames like python or ruby are not super useful by default
	RuntimeFilter *v1alpha1.RuntimeFilter `protobuf:"bytes,6,opt,name=runtime_filter,json=runtimeFilter,proto3,oneof" json:"runtime_filter,omitempty"`
	// group_by indicates the fields to group by
	GroupBy *v1alpha1.GroupBy `protobuf:"bytes,7,opt,name=group_by,json=groupBy,proto3,oneof" json:"group_by,omitempty"`
	// contains filtered or unexported fields
}

QueryRequest represents the request with the id of the profile to be queried.

func (*QueryRequest) Descriptor deprecated

func (*QueryRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetFilterQuery added in v0.17.0

func (x *QueryRequest) GetFilterQuery() string

func (*QueryRequest) GetGroupBy added in v0.21.0

func (x *QueryRequest) GetGroupBy() *v1alpha1.GroupBy

func (*QueryRequest) GetId

func (x *QueryRequest) GetId() string

func (*QueryRequest) GetNodeTrimThreshold added in v0.17.0

func (x *QueryRequest) GetNodeTrimThreshold() float32

func (*QueryRequest) GetProfileType

func (x *QueryRequest) GetProfileType() string

func (*QueryRequest) GetReportType

func (x *QueryRequest) GetReportType() v1alpha1.QueryRequest_ReportType

func (*QueryRequest) GetRuntimeFilter added in v0.21.0

func (x *QueryRequest) GetRuntimeFilter() *v1alpha1.RuntimeFilter

func (*QueryRequest) MarshalToSizedBufferVT

func (m *QueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryRequest) MarshalToVT

func (m *QueryRequest) MarshalToVT(dAtA []byte) (int, error)

func (*QueryRequest) MarshalVT

func (m *QueryRequest) MarshalVT() (dAtA []byte, err error)

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

func (x *QueryRequest) ProtoReflect() protoreflect.Message

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) SizeVT

func (m *QueryRequest) SizeVT() (n int)

func (*QueryRequest) String

func (x *QueryRequest) String() string

func (*QueryRequest) UnmarshalVT

func (m *QueryRequest) UnmarshalVT(dAtA []byte) error

type QueryResponse

type QueryResponse struct {

	// report is the generated report
	//
	// Types that are assignable to Report:
	//
	//	*QueryResponse_Flamegraph
	//	*QueryResponse_Pprof
	//	*QueryResponse_Top
	//	*QueryResponse_Callgraph
	//	*QueryResponse_FlamegraphArrow
	//	*QueryResponse_Source
	//	*QueryResponse_TableArrow
	Report isQueryResponse_Report `protobuf_oneof:"report"`
	// total is the total number of samples shown in the report.
	Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
	// filtered is the number of samples filtered out of the report.
	Filtered int64 `protobuf:"varint,6,opt,name=filtered,proto3" json:"filtered,omitempty"`
	// contains filtered or unexported fields
}

QueryResponse is the returned report for the given query.

func (*QueryResponse) Descriptor deprecated

func (*QueryResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetCallgraph

func (x *QueryResponse) GetCallgraph() *v1alpha1.Callgraph

func (*QueryResponse) GetFiltered added in v0.17.0

func (x *QueryResponse) GetFiltered() int64

func (*QueryResponse) GetFlamegraph

func (x *QueryResponse) GetFlamegraph() *v1alpha1.Flamegraph

func (*QueryResponse) GetFlamegraphArrow added in v0.19.0

func (x *QueryResponse) GetFlamegraphArrow() *v1alpha1.FlamegraphArrow

func (*QueryResponse) GetPprof

func (x *QueryResponse) GetPprof() []byte

func (*QueryResponse) GetReport

func (m *QueryResponse) GetReport() isQueryResponse_Report

func (*QueryResponse) GetSource added in v0.19.0

func (x *QueryResponse) GetSource() *v1alpha1.Source

func (*QueryResponse) GetTableArrow added in v0.19.0

func (x *QueryResponse) GetTableArrow() *v1alpha1.TableArrow

func (*QueryResponse) GetTop

func (x *QueryResponse) GetTop() *v1alpha1.Top

func (*QueryResponse) GetTotal added in v0.17.0

func (x *QueryResponse) GetTotal() int64

func (*QueryResponse) MarshalToSizedBufferVT

func (m *QueryResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse) MarshalToVT

func (m *QueryResponse) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse) MarshalVT

func (m *QueryResponse) MarshalVT() (dAtA []byte, err error)

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

func (x *QueryResponse) ProtoReflect() protoreflect.Message

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) SizeVT

func (m *QueryResponse) SizeVT() (n int)

func (*QueryResponse) String

func (x *QueryResponse) String() string

func (*QueryResponse) UnmarshalVT

func (m *QueryResponse) UnmarshalVT(dAtA []byte) error

type QueryResponse_Callgraph

type QueryResponse_Callgraph struct {
	// callgraph is a callgraph nodes and edges representation of the report
	Callgraph *v1alpha1.Callgraph `protobuf:"bytes,4,opt,name=callgraph,proto3,oneof"`
}

func (*QueryResponse_Callgraph) MarshalToSizedBufferVT

func (m *QueryResponse_Callgraph) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_Callgraph) MarshalToVT

func (m *QueryResponse_Callgraph) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_Callgraph) SizeVT

func (m *QueryResponse_Callgraph) SizeVT() (n int)

type QueryResponse_Flamegraph

type QueryResponse_Flamegraph struct {
	// flamegraph is a flamegraph representation of the report
	Flamegraph *v1alpha1.Flamegraph `protobuf:"bytes,1,opt,name=flamegraph,proto3,oneof"`
}

func (*QueryResponse_Flamegraph) MarshalToSizedBufferVT

func (m *QueryResponse_Flamegraph) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_Flamegraph) MarshalToVT

func (m *QueryResponse_Flamegraph) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_Flamegraph) SizeVT

func (m *QueryResponse_Flamegraph) SizeVT() (n int)

type QueryResponse_FlamegraphArrow added in v0.19.0

type QueryResponse_FlamegraphArrow struct {
	// flamegraph_arrow is a flamegraph encoded as a arrow record
	FlamegraphArrow *v1alpha1.FlamegraphArrow `protobuf:"bytes,7,opt,name=flamegraph_arrow,json=flamegraphArrow,proto3,oneof"`
}

func (*QueryResponse_FlamegraphArrow) MarshalToSizedBufferVT added in v0.19.0

func (m *QueryResponse_FlamegraphArrow) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_FlamegraphArrow) MarshalToVT added in v0.19.0

func (m *QueryResponse_FlamegraphArrow) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_FlamegraphArrow) SizeVT added in v0.19.0

func (m *QueryResponse_FlamegraphArrow) SizeVT() (n int)

type QueryResponse_Pprof

type QueryResponse_Pprof struct {
	// pprof is a pprof profile as compressed bytes
	Pprof []byte `protobuf:"bytes,2,opt,name=pprof,proto3,oneof"`
}

func (*QueryResponse_Pprof) MarshalToSizedBufferVT

func (m *QueryResponse_Pprof) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_Pprof) MarshalToVT

func (m *QueryResponse_Pprof) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_Pprof) SizeVT

func (m *QueryResponse_Pprof) SizeVT() (n int)

type QueryResponse_Source added in v0.19.0

type QueryResponse_Source struct {
	// source is the source report type result
	Source *v1alpha1.Source `protobuf:"bytes,8,opt,name=source,proto3,oneof"`
}

func (*QueryResponse_Source) MarshalToSizedBufferVT added in v0.19.0

func (m *QueryResponse_Source) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_Source) MarshalToVT added in v0.19.0

func (m *QueryResponse_Source) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_Source) SizeVT added in v0.19.0

func (m *QueryResponse_Source) SizeVT() (n int)

type QueryResponse_TableArrow added in v0.19.0

type QueryResponse_TableArrow struct {
	// table_arrow is a table encoded as a arrow record
	TableArrow *v1alpha1.TableArrow `protobuf:"bytes,9,opt,name=table_arrow,json=tableArrow,proto3,oneof"`
}

func (*QueryResponse_TableArrow) MarshalToSizedBufferVT added in v0.19.0

func (m *QueryResponse_TableArrow) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_TableArrow) MarshalToVT added in v0.19.0

func (m *QueryResponse_TableArrow) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_TableArrow) SizeVT added in v0.19.0

func (m *QueryResponse_TableArrow) SizeVT() (n int)

type QueryResponse_Top

type QueryResponse_Top struct {
	// top is a top list representation of the report
	Top *v1alpha1.Top `protobuf:"bytes,3,opt,name=top,proto3,oneof"`
}

func (*QueryResponse_Top) MarshalToSizedBufferVT

func (m *QueryResponse_Top) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse_Top) MarshalToVT

func (m *QueryResponse_Top) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse_Top) SizeVT

func (m *QueryResponse_Top) SizeVT() (n int)

type ShareServiceClient

type ShareServiceClient interface {
	// Uploads the profile and returns the link that can be used to access it.
	Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error)
	// Query performs a profile query
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
	// ProfileTypes returns the list of available profile types.
	ProfileTypes(ctx context.Context, in *ProfileTypesRequest, opts ...grpc.CallOption) (*ProfileTypesResponse, error)
}

ShareServiceClient is the client API for ShareService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ShareServiceServer

type ShareServiceServer interface {
	// Uploads the profile and returns the link that can be used to access it.
	Upload(context.Context, *UploadRequest) (*UploadResponse, error)
	// Query performs a profile query
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
	// ProfileTypes returns the list of available profile types.
	ProfileTypes(context.Context, *ProfileTypesRequest) (*ProfileTypesResponse, error)
	// contains filtered or unexported methods
}

ShareServiceServer is the server API for ShareService service. All implementations must embed UnimplementedShareServiceServer for forward compatibility

type UnimplementedShareServiceServer

type UnimplementedShareServiceServer struct {
}

UnimplementedShareServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedShareServiceServer) ProfileTypes

func (UnimplementedShareServiceServer) Query

func (UnimplementedShareServiceServer) Upload

type UnsafeShareServiceServer

type UnsafeShareServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeShareServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShareServiceServer will result in compilation errors.

type UploadRequest

type UploadRequest struct {

	// pprof bytes of the profile to be uploaded.
	Profile []byte `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
	// Description of the profile.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

UploadRequest represents the request with profile bytes and description.

func (*UploadRequest) Descriptor deprecated

func (*UploadRequest) Descriptor() ([]byte, []int)

Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.

func (*UploadRequest) GetDescription

func (x *UploadRequest) GetDescription() string

func (*UploadRequest) GetProfile

func (x *UploadRequest) GetProfile() []byte

func (*UploadRequest) MarshalToSizedBufferVT

func (m *UploadRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*UploadRequest) MarshalToVT

func (m *UploadRequest) MarshalToVT(dAtA []byte) (int, error)

func (*UploadRequest) MarshalVT

func (m *UploadRequest) MarshalVT() (dAtA []byte, err error)

func (*UploadRequest) ProtoMessage

func (*UploadRequest) ProtoMessage()

func (*UploadRequest) ProtoReflect

func (x *UploadRequest) ProtoReflect() protoreflect.Message

func (*UploadRequest) Reset

func (x *UploadRequest) Reset()

func (*UploadRequest) SizeVT

func (m *UploadRequest) SizeVT() (n int)

func (*UploadRequest) String

func (x *UploadRequest) String() string

func (*UploadRequest) UnmarshalVT

func (m *UploadRequest) UnmarshalVT(dAtA []byte) error

type UploadResponse

type UploadResponse struct {

	// id of the uploaded profile.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// link that can be used to access the profile.
	Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`
	// contains filtered or unexported fields
}

UploadResponse represents the response with the link that can be used to access the profile.

func (*UploadResponse) Descriptor deprecated

func (*UploadResponse) Descriptor() ([]byte, []int)

Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.

func (*UploadResponse) GetId

func (x *UploadResponse) GetId() string
func (x *UploadResponse) GetLink() string

func (*UploadResponse) MarshalToSizedBufferVT

func (m *UploadResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*UploadResponse) MarshalToVT

func (m *UploadResponse) MarshalToVT(dAtA []byte) (int, error)

func (*UploadResponse) MarshalVT

func (m *UploadResponse) MarshalVT() (dAtA []byte, err error)

func (*UploadResponse) ProtoMessage

func (*UploadResponse) ProtoMessage()

func (*UploadResponse) ProtoReflect

func (x *UploadResponse) ProtoReflect() protoreflect.Message

func (*UploadResponse) Reset

func (x *UploadResponse) Reset()

func (*UploadResponse) SizeVT

func (m *UploadResponse) SizeVT() (n int)

func (*UploadResponse) String

func (x *UploadResponse) String() string

func (*UploadResponse) UnmarshalVT

func (m *UploadResponse) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL